ساعدوني وفهموني 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=


هذي الفقرة الاخيره ما فهمت وش المطلوب
(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=


وهذا هو الكود
<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
الدولة :
الجنس :
| |
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى
» كبسولات نباتية فارغة
» شحن عملات تيك توك مجانا بدون رقم هاتف
» فوط صحية ناعمة لايام الولادة بالقطن العضوية قوية الامتصاص| organyckw
» اعلانات الباصات الكويت | شركة دعاية واعلان | كواليتي ميكرز | 0096597550465
» كيفية تحديد سعر تصميم تطبيقات الجوال– ايكون تك
» تعلم كيفية حفظ و أسترجاع الصورة فى قاعدة بيانات أكسس باستخدام الكائن Stream object
» كيفية تأسيس شركة في دبي
» افضل واحدث كاميرات المراقبة الامنية والمشاهدة عبر الانترنت
» اصنع شبكتك بنفسك