حل واجبات الجامعة العربية المفتوحة whats : 00966542495275

أهلا وسهلا بك إلى منتدي حل واجبات الجامعة العربية المفتوحة || 00966542495275
 
الرئيسيةاليوميةس .و .جبحـثالأعضاءالمجموعاتالتسجيلدخول

شاطر | 
 

 M150B TMA – Fall 2017/2018 Cut-off date: To be announced Total marks: 80 This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated above. The TMA is marked out of 80, out of which 20% will be consi

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


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

مُساهمةموضوع: M150B TMA – Fall 2017/2018 Cut-off date: To be announced Total marks: 80 This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated above. The TMA is marked out of 80, out of which 20% will be consi   الأحد نوفمبر 19, 2017 11:50 pm

M150B
TMA – Fall 2017/2018
Cut-off date: To be announced
Total marks: 80

This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated above.
The TMA is marked out of 80, out of which 20% will be considered for your continuous assessment grade.
It consists of 2 questions: 35 marks for question1, 40 marks for question2 and 5 marks for the programming style.
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 to get high grade in this TMA.

Arab Open University Faculty of Computer Studies M150 Data, computing and information


Page 2 / 4

Question 1 [35 marks]





In this question you need to use functions from the "dateLibrary.js" in addition to some of the Date object methods you've learnt in unit 9. The specifications of all the functions in the "dateLibrary.js" library are in Appendix 1 at the end of unit 9.

1. Write a function called myLeapYearFunction(aDate) that takes a Date object as its argument. The function checks if aDate falls in a leap year and displays an appropriate message in the output window accordingly. The function should use the function isLeapYear() from the "dateLibrary.js".
2. Now, you need to do the following: a. Create any date in the year 2000 and print it in the long form (i.e. including the month name). b. Calculate the difference in days and years between today's date and the date you've just created and print them in the output window. Do the following to the date you've created in a.: c. Change the year to be 2018 and print the date again in the long form. d. Call the function myLeapYearFunction() to check whether it falls in a leap year. 3. Insert a screenshot that shows the resulted output of your code.
Page 3 / 4

Question 2 [40 marks]

You are required to model a new user-defined object type, Worker.
The Worker object type has the following properties:
name: a string representing the name of the worker.
hourlyWage: a number representing the hourly wage of the worker in dollars.
hours: a number representing the total number of working hours worked by the worker.
The Worker object type has the following methods:
getName(): a method that returns the name of the worker.
getHourlyWage(): a method that returns the hourlyWage of the worker.
getHours():a method that returns the hours worked by of the worker.
calculatePayment():a method that calculates the total payment of the worker. This is calculated by multiplying the hours worked by the hourly wage of the worker. For example, if a worker worked for 40 hours and his hourly wage is 35$, then his payment will be 40 X 35 which is 1400$.
printDetails(): a method that displays (in an alert window) the name, hourly wage, hours worked and total payment of the worker. The method should use the available methods of the Worker object.
a. Write the Worker constructor function function Worker (aName, anHourlyWage, numberOfHours).
b. Implement all the Worker methods according to the above specifications.
c. Prompt the user for values of name, hourly wage and total number of hours worked by the Worker object to be created.
d. Create a Worker object and initialize its properties by the values entered by the user. e. Print the Worker object information using the printDetails() method. f. Run your program. In your Solution document insert two screenshots: [4]
− one showing the program prompting for the Worker name, with you having entered your name but not yet pressed OK;
− one showing the resulted alert window. g. Change the hourlyWage of the Worker instance. You need first to read the new value of hourly wage from the user.
h. Print the Worker instance information again and provide another screenshot showing the resulted alert window.

Page 4 / 4


Programming style [5 marks]:

In your answers to questions 1, 2 and 3, you should follow good programming style that helps readability. This includes:

• Using comments at the beginning of each program stating the purpose of it. • Using spacing and indentation to help making the structure of your program clear. • The output of programs includes descriptive texts that describe the resulted output. • Following the M150 style guidelines when choosing the names of the variables. This includes: (Refer to section 2.2 of unit 7, page 16) - Avoiding very short identifiers, such as a, b, x, ch. - Avoiding the use of $ and _ in identifiers. - Choosing meaningful names that give indication of the role played by the variable. - Starting your identifiers with lower-case letters.

TMA submission:

You should write your solutions to all the questions with the required screenshots in a single word document. Head the document with your name and your student ID.






End of question



_________________

لتحميل ملف حل الواجب .docx  من خلال التسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الملف  


خدمات مجانية – حلول واجبات الجامعة العربية المفتوحة - حل واجب tma tma01
لجميع تخصصات الجامعة ولجميع فروع الجامعة
حلول واجبات – مشاريع تخرج – ملخصات هامة
http://solution.123.st
whatsapp::00966542495275
whatsapp::00966542495275

whatsapp::00966542495275
smsm.hamdy66@yahoo.com
حلول مضمونة وغير مكررة وغير متشابهة لجميع واجبات الجامعة
متوفرمدرسين ومدرسات لجميع المواد والتخصصات
KSA-Kuwait-Bahrain-Oman-Jordon-Lebanon-Egypt
الكويت-البحرين-عمان-الأردن-السعودية-لبنان-مصر
الرياض-الدمام-جدة-الأحساء-المدينة المنورة-جده-حائل-بيروت-المنامة-القاهرة-مسقط
pg ,h[fhj hg[hlum hguvfdm hgltj,pm - pg,g ,h[fhj hg[hlum hguvfdmhgltj,pm
http://solution.123.st
الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://solution.123.st
 
M150B TMA – Fall 2017/2018 Cut-off date: To be announced Total marks: 80 This TMA should be submitted to your tutor electronically through the LMS system before the cut-off date indicated above. The TMA is marked out of 80, out of which 20% will be consi
استعرض الموضوع السابق استعرض الموضوع التالي الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» تشكيل لجنة لإعداد ملف لاستضافة المغرب لأمم إفريقيا عام 2015 أو 2017
» خطط التحسن ونظم المتابعة لجميع المجالات2016/2017
» System Lockdown Policy
» The Basic Parts of a Drip System
» حصريا لعبة CraZy Taxi 1 خرافة

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
حل واجبات الجامعة العربية المفتوحة whats : 00966542495275 :: حل واجبات الجامعة العربية المفتوحة 2018-2017 :: حل واجبات الجامعه العربيه المفتوحه 2017/2018-
انتقل الى: