المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : حل واجب m150b اتصل 0544321455/00966544321455 ايميل [email protected]



أسواق
26-10-2013, 10:00 PM
حل واجب m150b اتصل 0544321455/00966544321455 ايميل [email protected] (http://www.aswaqcity.com/thread1310562.html)



حل واجبات الجامعة العربية المفتوحة
اتصل : O544321455 - OO966544321455
واتس اب: 966544321455+
ايميل : [email protected]
سكايبي : a_al_shora

حل واجب (http://www.aswaqcity.com/thread1310562.html) 0.5.4.4.3.2.1.4.5.5 الجامعة العربية المفتوحة


حل واجبات الجامعة العربية المفتوحة O54.4.3.2.1.4.5.5 - OO96654.4.3.2.1.4.5.5
ايميل : a_al_shora @ h.o.t.m.ail.c.o.m
سكايبي: a_al_shora
واتس اب: OO96654.4.3.2.1.4.5.5






M150B
TMA – Fall 2013/2014
Cut-off date: 7-Dec-13
Total marks: 80
Arab Open University
Faculty of Computer Studies
M150 Data, computing and information
Question 1 [20 marks]
1. Write program according to the following:
a. Define a function occurrence(anArray,num), that takes an array anArray and a number num as arguments. The function returns the number of occurrences of num in anArray.
b. Declare an array of 10 elements.
c. Ask the user to enter any 10 numbers and fill them in the array.
d. Print the array elements in the output
e. Using the function occurrence(), display on the screen the number of occurrences of number 0 in the array. If the number 0 doesn’t exist in the array, you should display a suitable message also.
f. Run your program two times: one where the number 0 is an element on the array and another time where the number 0 is not in the array. Provide two screenshots of the two required outputs of your program. This should also show the arrays elements.

Question 2 [20 marks]
In unit9, page 21 you were introduced to the methods associated with Date . In the same unit, section 4.2 you learned how to use functions from the "dateLibrary.js" in programs. The specifications for all the functions in this library are in Appendix 1 at the end of unit 9.
Write statements to do the following:
a. Create a Date representing the date 2 June 1950.
b. Create another Date representing the date 13 November 2013.
c. Calculate the difference in years between the two dates and print it in the output
d. For the Date you've created in a. do the following:
- Change the state to be 30 December 2000. You should not create a new date.
- Display the day .
- Display it in long form.
e. Insert a screenshot that shows the resulted output of parts c and d.
f. Provide a copy of the specifications of all the functions you’ve used in writing your program.
g. What information do we usually find in function specifications?

Question 3 [20 marks]
You are required to model a new user-defined type, Game.
The Game type has the following properties:
: a string representing the of the Game.
level: a string representing the level of the game, such as easy, moderate, difficult.
chance: a number (from 1 to 6) representing the chance of playing the game.
The Game can go forward to further chances, however, the maximum value of chance is 6.
The Game type has the following methods:
get(): a method that returns the of the game.
getLevel(): a method that returns the level selected of the game.
getChance(): a method that returns the chance of playing the game.
moveForward(): a method that gives the next chance (i.e. increments chance by 1) only if the chance is less than 6. Otherwise, set it to 1.
displayInfo(): a method that displays the , level and the chance of the game in an alert box, using the three methods: get() and getLevel() and getChance().
a. Write the Game constructor function Game(a, aLevel, aChance).
b. Implement the methods get(),getLevel (), getChance(), and displayInfo() according to the above specifications.
c. Prompt the user for values of and level of a game he wants to create.
d. Create a game instance and initialize its properties by the values entered by the user. Chance should be set to 1.
e. Use an appropriate methods to:
−Increment the game by two chances.
−Print the game information.
f. Run your program and test it to make sure it works properly. In your Solution insert two screenshots: [3]
−one showing the program prompting for the game , with you having entered the but not yet pressed OK;
−one showing the resulted alert

Question 4 [20 marks]
1. Briefly define the term HCI. What's the purpose of this kind of study? [4 marks]
2. What is a user interface? Give two examples of user interfaces you use in your daily life. [6 marks]
3. In the con of UI design, define and briefly explain (using your own understanding) the terms: visibility, affordance, tolerance and consistency. [10]
Important note: In your answers to questions 1, 2 and 3, you should follow good programming style that helps readability. This includes:
Using short comment at the beginning stating the purpose of your program.
Using spacing and indentations to help make the structure of your program clear.
Following the M150 style guidelines when choosing s for the variables (Refer to section 2.2 of unit 7 page 16)





حل واجبات الجامعة العربية المفتوحة
اتصل : O544321455 - OO966544321455
واتس اب: 966544321455+
ايميل : [email protected]
سكايبي : a_al_shora

حل واجب (http://www.aswaqcity.com/thread1310562.html) 0.5.4.4.3.2.1.4.5.5 الجامعة العربية المفتوحة


حل واجبات الجامعة العربية المفتوحة O54.4.3.2.1.4.5.5 - OO96654.4.3.2.1.4.5.5
ايميل : a_al_shora @ h.o.t.m.ail.c.o.m
سكايبي: a_al_shora
واتس اب: OO96654.4.3.2.1.4.5.5