منتدى واجبات الجامعة العربية المفتوحة aoua.com

حلول واجبات الجامعة العربية المفتوحة لجميع تخصصات الجامعة ولجميع فروع الجامعة حلول واجبات – مشاريع تخرج – ملخصات هامة Mobile: 00966542495275 حلول واجبات الجامعة ا
 
الرئيسيةاليوميةس .و .جبحـثالأعضاءالمجموعاتالتسجيلدخول

شاطر | 
 

 واجب m150b + حل الواجب m150 b tma01 بملف واحد

اذهب الى الأسفل 
كاتب الموضوعرسالة
whatsapp::00966542495275
Admin


المساهمات : 1084
تاريخ التسجيل : 03/02/2012

مُساهمةموضوع: واجب m150b + حل الواجب m150 b tma01 بملف واحد   الأحد مارس 25, 2012 5:43 am

M150 حل واجب M150 tma01 Arab Open University
Faculty of Computer Studies
M150 Data, computing and information
M150B
TMA01 – Spring 2011/2012
Cut-off date: April 23, 2012
Total marks: 80
This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated above.
You should write your solutions to the questions in a single word document. Head the document with your name and your Personal Identifier (ID).
This TMA assesses your understanding of Units 9, 10, 11 and 12 of M150B.
It is marked out of 80, out of which 20% will be considered for the continuous assessment grade.
It consists of 4 questions. The total marks for each question are shown at the beginning of each question. The marks allocated to each part of a question are indicated in the margin.
You should be able to answer the questions of this TMA once you have completed the unit(s) each question covers:
Question 1: Unit 9
Question 2: Unit 9
Question 3: Unit 10
Question 4: Unit 11 & 12
Important note: Before you start working with this assignment, you need to refer to section 8.2 of the M150 course companion to read about plagiarism and how to avoid it. This will help you get high grade in this TMA.
Page 1 / 5
Question 1 [20 marks]
You are required to model a new user-defined object type, ClubMember.
The ClubMember object has the following properties:
name: a string that will hold the name of the member in a health club.
height: a whole number representing the height (in meters) of the member. weight: a whole number representing the weight (in kilograms ) of the member.
The ClubMember object type has the following two methods:
calcBMI(): a method to calculate and return the Body Mass Index (BMI) of the member, where BMI is calculated using the following formula:
BMI = weight (in kilograms)
—————————————
(height in meters) ²
showHealthStatus(): a method to display the details and health information of the member including: his name, height, weight, BMI, and whether this person is underweight, normal, overweight or obesity depending on the BMI.
Depending on the BMI, a person is:
Underweight if the BMI is less or equals to 18.5
Normal weight if the BMI is greater than 18.5 and is less than 25
Overweight if the BMI is greater or equals to 25 and is less than 30
Obesity if the BMI is 30 or more.
Using good programming style, write JavaScript code to do the following:
a. Write the constructor function ClubMemebr(aName, aHeight, aWeight).
b. Implement the methods calcBMI()and showHealthStatus() according to the above specifications.
c. Ask the user for his name, weight and height. These should represent your name, height and weight.
d. Create a ClubMemebr instance and initialize its properties with the entered values.
e. Show the health information of the member using an appropriate method.
f. Insert a screenshot showing the resulted output.
Important note: In your answers to question1, 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 names.
− Using spacing and indentations to help make the structure of your program clear.
Page 2 / 5
Question 2 [20marks]
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: [15 marks]
a. Create a Date object representing the date 28 July 1914 which represents the starting date of the First World War and assign it to the variable old.
b. Create another Date object representing the date 23 April 2012 (The TMA cut-off date) and assign it to the variable recent.
c. Calculate the difference in years between the two dates old and recent and print it in the output window.
d. Change the state of the date old to be 1 September 1939 which represents the starting date of the Second World War. You should not create a new Date.
e. Calculate the difference in years between the two dates old and recent and print it in the output window.
f. Briefly explain the difference between the JavaScript statements you used in c. (and e.) and the others you used in d. in terms of type and how they are used.
2. Consider the following JavaScript code (with line numbers added for reference): [5 marks]
1. var arrayA = [10,10,10];
2. var arrayB = arrayA;
3. arrayA[1] = 5;
4. arrayB[2] = 8
5. arrayB = [1,1,1];
6. document.write(arrayA);
7 document.write('<BR>'+ arrayB);
a. What is the output of the above code?
b. How many Array objects exist immediately after executing line 4?
c. How many Array objects exist after executing all the above code?

Page 3 / 5
Question 3 [20 marks]
1. Designing is one on the main activities of software development process which involves creating descriptions of the software needed. [6 marks]
a. How can this be achieved?
b. Briefly explain what is meant by top-down approach which is sometimes followed in the designing process.
2. Check the following JavaScript code then answer the questions below: [14 marks]
var balance; var age;
age = parseFloat(window.prompt('What is your age?', '')); if(age<20)
{
window.confirm('You are too young to have a loan')
}
else
{
balance = window.prompt('What is your account balance?',
'');
if(balance >= 1000)
{
window.confirm('You are entitled to a loan of 2000')
}
else
{
if(balance > 0)
{
window.confirm('You are entitled to a loan of 1500')
}
else
{
window.confirm('You are not entitled to a loan')
}
}
}
a. Briefly explain what is meant by a boundary value.
b. What result would the program give for following cases:
1. An age input of 18.
2. An age input of 20 and a balance input of 900.
3. An age input of 30 and a balance input of 1000.
4. An age input of 40 and a balance input of 0.
c. What are the boundaries values that the programmer need to consider when testing the program? You need to specify all the test values to be used.
Page 4 / 5
Question 4 [20 marks]
1. What are the properties of agents? [7 marks] Discuss how computers can act as agents.
2 List the four activities involved in the information loop. [4 marks]
3. Open the calculator application provided by Microsoft Windows, which is shown in Figure 1.
Work with the application to do some calculations and then discuss the visibility, affordance and feedback of widgets 1, 2 & 3 shown in the figure. [9 marks]

Figure 1: The Calculator application

Page 5 / 5
PDF to Word
الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://aouf.123.st
 
واجب m150b + حل الواجب m150 b tma01 بملف واحد
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
منتدى واجبات الجامعة العربية المفتوحة aoua.com :: منتدى الطلاب الجامعة العربية المفتوحة :: حلول واجبات الجامعة-
انتقل الى: