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

مشاهدة النسخة كاملة : حل واجب M150b المدرس 0544321455 - 00966544321455 - [email protected]



أسواق
18-07-2013, 11:30 PM
حل واجب M150b المدرس 0544321455 - 00966544321455 - [email protected] (http://www.aswaqcity.com/thread1244737.html)


M150B: Data, computing and information

Tutor Marked Assignment 01. Due date: 3/8/2012


PART 1

Write program according to the following specification:

Q.1 Define a new Library which contains the following functions
a) Define a function called CtF which converts from Fahrenheit to Celsius, It takes a degree in Celsius as argument and returns the a degree in Fahrenheit
b) Define a function called FtC which converts from Celsius to Fahrenheit, It takes a degree in Fahrenheit as argument and returns the a degree in Celsius

Q. 2. Write program that display the following
Choose a number
1-Convert from Fahrenheit to Celsius
2-Convert from Celsius to Fahrenheit
3-Exit

The program keeps asking the user to prompt a number to choose whatever converts from Fahrenheit to Celsius or vice versa. Then ask the user to prompt the corresponding data he needs to convert, then the program alert the result in a The program stops once the user entered 3 to exit
Your program should use the functions that you create in the Library in part Q1.

Notes: Use your own s for variables, functions and the library, and keep your program style readable. Screen shots on each transction must be provided.
PART 2
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. Check the summer Calendar from the site.
Write statements to do the following:
a. Create the date of the first date in summer semester using multi-numerical arguments constructor
b. Create the date of the last date in summer semester using single string argument constructor
c. Use the corresponding functions in "dateLibrary.js" to display the dates on the screen as long string representation
d. Use the corresponding functions in "dateLibrary.js" to print the calendar of the summer semester, the calendar should display the months of the summer semester only

PART 3
You are required to model a new user-defined type, Car.
The Frog type represents a very simple car and has the following properties:
position: a number representing the position of the frog
colour: a string representing the colour of the frog.
status: a string representing the status of the frog “jump”, “crock”, “swimming”.


The Frog type has the following methods:
updateStatus(aStatus): a method that changes the status of frog by aStatus

setPosition(aPosition): a method that sets/alters the frog’s position by aPosition
getPosition(): a method that returns the current value of frog’s position

getColour(): a method that returns the current value of frog’s colour

displayInfo(): a method that displays the current values of position, colour, and status of the Frog

Using good programming style that helps readability, write code to do the following:
a. Write the constructor function Frog(aPosition, aColour,aStatus).
b. Implement the methods updateStatus(aStatus), setPosition(aPosition), getPosition(),getColour(), and displayInfo() according to the above specifications.
c. Create a Frog instance d frog1, and initialize its properties by your own values, and then display its information
d. Use appropriate methods to make the following to Frog1:
− update the status of the frog by your own value
− ask the user to prompt the new position of the frog and then update the
position of the frog
− update the colour of the frog by your own value.
− Finally, display the frog information.
Important note: In your answers to this question, you should follow good programming style that helps readability. This includes:
− Using short comment at the beginning stating the purpose of your program.
− Selecting meaningful variables s.
− Using spacing and indentations to help make the structure of your program clear.
PART 4
1. Answer the following questions:
a. What are the main features of a good user interface?
b. What are the impacts of having a good UI system in an organization?

2. Recoverability of a UI refers to how easy it is for the users to recover from their
mistakes. Mention and briefly describe the two types of error recovery.
3. Answer the following questions:
a. What is the role of the Construction function?
b. What is the difference between value semantic and reference semantic?
c. What is the difference between properties and method?
4. Answer the following questions:
a. What is the difference between value semantic and reference semantic?
b. What is the size of the , and what is the size of the primitive value?
c. Give an example of 2 different s refer to the same ? Use Frog in Question 3




حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]
حل واجبات الجامعة العربية المفتوحة O544321455 - OO966544321455
[email protected]