ساعدوني وفهموني help me
صفحة 1 من اصل 1 • شاطر
ساعدوني وفهموني help me
مساء الخير عليكم
عندي هالسؤال هذا جنن
[url=][/url]
هذي الفقرة الاخيره ما فهمت وش المطلوب
(j) suggest another way to change the salary of the Employee instance other than what you have done in g .show the changes needed in the program to implement it and give an example on how you are going to use it
كتبت الكود وعرض لي كذا ما ني عارفه وين هي المشكله
[url=][/url]
وهذا هو الكود
<html>
<body>
<scrpit SRC="dateLibrary.js"></scrpit>
<scrpit>
//Creating the object "Emplyee"
function Employee(aName, aDOB, aSalary)
{
//Properties.
this.name = aName;
this.dob = aDOB;
this.salary = aSalary;
//Methods.
this.getName = GetName;
this.getDOB = GetDOB;
this.getSalary = GetSalary;
this.printDetails = PrintDetails;
}
//Implementing the function "getName".
function GetName()
{
//Returning the name of the employee.
return (this.name);
}
//Implementing the function "getDOB".
function GetDOB()
{
//Returning the date of birth of the employee.
return (this.dob);
}
//Implementing the function "getSalary".
function GetSalary()
{
//Returning the salary of the employee.
return (this.salary);
}
//Implementing the function "printDetails".
function PrintDetails()
{
//Printing all required details of the employee.
var todayDate = new Date();
var birthDate = new Date(this.getDOB());
window.alert("Name: " + this.getName() + "\n" + "Date of Birth: " + dateStringShort(birthDate) + "\n" + "Age: "+ differenceInYears(todayDate, birthDate) + "\n" + "Salary: " + this.getSalary());
}
//Prompting the user to enter his/her data.
aName = window.prompt("Enter your name","");
aDOB = window.prompt("Enter your date of birth","");
aSalary = window.prompt("Enter your salary","");
//Initializing a new "Employee" with user entries.
var newEmployee = new Employee(aName, aDOB, aSalary);
//Printing the details of the employee.
newEmployee.printDetails();
//Asking the employee to change his/her salary.
var aSalary = window.prompt("Enter your new salary","");
//Updating the new details of the employee.
newEmployee.salary = aSalary;
//Printing the details of the employee after his/her saved new entries.
newEmployee.printDetails();
</scrpit>
</body>
</html>
عندي هالسؤال هذا جنن
[url=][/url]
هذي الفقرة الاخيره ما فهمت وش المطلوب
(j) suggest another way to change the salary of the Employee instance other than what you have done in g .show the changes needed in the program to implement it and give an example on how you are going to use it
كتبت الكود وعرض لي كذا ما ني عارفه وين هي المشكله
[url=][/url]
وهذا هو الكود
<html>
<body>
<scrpit SRC="dateLibrary.js"></scrpit>
<scrpit>
//Creating the object "Emplyee"
function Employee(aName, aDOB, aSalary)
{
//Properties.
this.name = aName;
this.dob = aDOB;
this.salary = aSalary;
//Methods.
this.getName = GetName;
this.getDOB = GetDOB;
this.getSalary = GetSalary;
this.printDetails = PrintDetails;
}
//Implementing the function "getName".
function GetName()
{
//Returning the name of the employee.
return (this.name);
}
//Implementing the function "getDOB".
function GetDOB()
{
//Returning the date of birth of the employee.
return (this.dob);
}
//Implementing the function "getSalary".
function GetSalary()
{
//Returning the salary of the employee.
return (this.salary);
}
//Implementing the function "printDetails".
function PrintDetails()
{
//Printing all required details of the employee.
var todayDate = new Date();
var birthDate = new Date(this.getDOB());
window.alert("Name: " + this.getName() + "\n" + "Date of Birth: " + dateStringShort(birthDate) + "\n" + "Age: "+ differenceInYears(todayDate, birthDate) + "\n" + "Salary: " + this.getSalary());
}
//Prompting the user to enter his/her data.
aName = window.prompt("Enter your name","");
aDOB = window.prompt("Enter your date of birth","");
aSalary = window.prompt("Enter your salary","");
//Initializing a new "Employee" with user entries.
var newEmployee = new Employee(aName, aDOB, aSalary);
//Printing the details of the employee.
newEmployee.printDetails();
//Asking the employee to change his/her salary.
var aSalary = window.prompt("Enter your new salary","");
//Updating the new details of the employee.
newEmployee.salary = aSalary;
//Printing the details of the employee after his/her saved new entries.
newEmployee.printDetails();
</scrpit>
</body>
</html>
عاشقة المساء- .
- تاريخ التسجيل : 24/04/2014
المساهمات : 6
النقاط : 12
التقيم : 0
الدولة :
الجنس :
عاشقة المساء- .
- تاريخ التسجيل : 24/04/2014
المساهمات : 6
النقاط : 12
التقيم : 0
الدولة :
الجنس :
رد: ساعدوني وفهموني help me
عاشقة المساء كتب:up
أختى الكريمة أعتقد انه ربما لن يجيب عليك احد هنا فالمنتدى يعانى من كوادر فى الجافا اسكريبت ...ارجوا المعذرة
نجلاء فتحي- ....
- تاريخ التسجيل : 20/02/2011
المساهمات : 53
النقاط : 103
التقيم : 0
الجنس :
رد: ساعدوني وفهموني help me
عرفت وين المشكلة طلعت مشكلة بسيطه هي في script وليس scrpit
عاشقة المساء- .
- تاريخ التسجيل : 24/04/2014
المساهمات : 6
النقاط : 12
التقيم : 0
الدولة :
الجنس :
رد: ساعدوني وفهموني help me
Hope you have hot help!
linesoft- .
- تاريخ التسجيل : 17/04/2022
المساهمات : 1
النقاط : 1
التقيم : 0
الدولة :
الجنس :
| |
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى
الخميس أبريل 25, 2024 8:56 pm من طرف moslema_r
» شركة مكافحة حشرات في راس الخيمة
الخميس أبريل 25, 2024 8:34 pm من طرف moslema_r
» تطبيقIncogniton لإدارة ملفات تعريف متعددة للمتصفح
الأربعاء أبريل 24, 2024 3:51 pm من طرف زاكااا
» افضل شركة مكافحة النمل الابيض بالرياض
الإثنين أبريل 22, 2024 9:41 pm من طرف moslema_r
» Exemplary Сasual Dating - Verified Women
الخميس أبريل 18, 2024 9:18 pm من طرف wdqwd
» رش الدفان بالرياض
الخميس أبريل 18, 2024 7:11 pm من طرف moslema_r
» شركة تنظيف خزانات الشارقة
الخميس أبريل 18, 2024 6:57 pm من طرف moslema_r
» شركة مكافحة الفئران بالرياض
الإثنين أبريل 15, 2024 8:23 pm من طرف moslema_r
» افضل شركة كشف تسربات المياه بالباحة
الخميس أبريل 04, 2024 7:02 am من طرف gmalnagy
» ساعدوني وفهموني help me
الجمعة مارس 29, 2024 8:37 am من طرف linesoft