حل واجبات الجامعة العربية المفتوحة An excellent tutor

حل واجبات الجامعة العربية المفتوحة An excellent tutor 0551783558 حلول واجبات مع الشرح حلول واجبات الجامعة العربية المفتوحة الجامعة العربية المفتوحة 00966551783558
 
البوابةالبوابة  الرئيسيةالرئيسية  اليوميةاليومية  س .و .جس .و .ج  بحـثبحـث  الأعضاءالأعضاء  المجموعاتالمجموعات  التسجيلالتسجيل  دخولدخول  

شاطر | 
 

 حل واجب m150

استعرض الموضوع السابق استعرض الموضوع التالي اذهب الى الأسفل 
كاتب الموضوعرسالة
Admin
Admin
avatar

عدد المساهمات : 780
تاريخ التسجيل : 01/02/2012

مُساهمةموضوع: حل واجب m150   الإثنين أكتوبر 15, 2012 9:14 pm

Question 1 [20 marks]
1. Answer the following questions: [10]
a. What is the purpose of having functions in programs?
b. Mention the four important parts of a function definition.
c. How do you call functions?
d. How do you know whether a function return a value or not?
e. How do you call a function that returns a value so that you don’t lose the
returned value?
2. Write JavaScript program according to the following: [10]
a. Define a function called double1 which takes one argument (a
number). The function calculates the double of the argument and prints it
in the output window. It doesn’t return any value.
b. Define another function called double2 which takes one argument (a
number). The function calculates the double of the argument and returns
the calculated value.
c. Use the function double1 to calculate and print the double of 9.
d. Use the function double2 to calculate and print the double of 10.
Question 2 [20 marks]
In unit9, page 21 you were introduced to the methods associated with Date object. In
the same unit, section 4.2 you learned how to use functions from the "dateLibrary.js" in
JavaScript programs. The specifications for all the functions in this library are in
Appendix 1 at the end of unit 9.
1. Write JavaScript statements to do the following:
a. Create the date 1 March 1995 and assign it to the variable date1.
b. Create a date representing today’s date and assign it to the variable
date2.
c. Calculate the difference in days and years between date1 and date2
and print them in the output window.
d. Change the month of date1 to be January.
e. Print the month of date1 in the output window.
f. Check whether date1 falls in a leap year or not and display an
appropriate message in the output window accordingly.
g. Insert a snapshot that shows the resulted output of parts c, e and f.
2. From the JavaScript statements you wrote in part 1, identify the function calls
and methods calls; put single line under functions calls and double line under
methods calls.
Page 3 / 4
Question 3 [20 marks]
You are required to model a new user-defined object type, ToyCar.
The ToyCar object type has the following properties:
name: a string variable representing the name of the ToyCar.
position: a number variable that will hold the current position of the ToyCar.
The ToyCar object type has the following methods:
moveForward(aNumber): moves the ToyCar forward by aNumber steps; i.e.
increments position by aNumber.
moveBackward(aNumber): moves the ToyCar backward by aNumber steps; i.e.
decrements position by aNumber.
horn(): makes the ToyCar horn by displaying: "Beep Beep" in an alert window.
display(): displays the name and position of the ToyCar in an alert window.
a. Write the ToyCar constructor function ToyCar(aName,aPosition).
b. Implement the methods moveForward(aNumber),
moveBackward(aNumber), horn() and display() according to the
above specifications.
c. Ask the user about the name of the ToyCar.
d. Create a ToyCar instance and initialize its properties as follows:
name = the name given by the user in step c, position = 0.
e. Use appropriate methods to do the following:
1. Move the ToyCar instance 15 steps forward.
2. Make the ToyCar instance horn.
3. Move the ToyCar instance 5 steps backward.
4. Show the information of the ToyCar instance.
f. Insert a screenshot showing the resulted output that shows the ToyCar
instance information.
Page 4 / 4
Question 4 [20 marks]
1. Define and briefly explain the two terms: HCI and user interface (UI). [4 marks]
2. Consistency is an important HCI design principle. Discuss and explain the term
giving an example on the consistency used in Microsoft Office applications. [4
marks]
3. What advantage does consistency provide for users? [3 marks]
4. Consider the screen shown in Figure 1. [9 marks]
a. Discuss and comment on the visibility and affordance of the two buttons
indicated in number 1 & 2.
b. Discuss and comment on the visibility, affordance and feedback of the
minimize, restore and close buttons indicated in number 3.
Figure 1: A screen with two buttons
الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://tma4u.montadarabi.com
 
حل واجب m150
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
حل واجبات الجامعة العربية المفتوحة An excellent tutor :: حل واجبات الجامعة العربية المفتوحة oo966551783558TMA :: حل واجبات الجامعة العربية المفتوحة mt 2620551783558-
انتقل الى: