العودة   منتديات طلاب الجامعة العربية المفتوحة > منتدى كليات الجامعة العربية المفتوحة > منتدى تقنية المعلومات والحاسوب > M257

إضافة رد
 
أدوات الموضوع انواع عرض الموضوع

قديم 22-04-2016, 05:32 PM   #1
IT_Dana IT_Dana غير متصل
طــالب

 










افتراضي مناقشة البارت 4 من الواجب


Part 4 [50 marks] Part4.1 [2 marks]
In this part you are required to:
1) Review Chapters 3, 4 & 5from M257 Material.
2) Open M257_TMA_Spring15_ID Project on NetBeans IDE that you created in Part 1.
3) Then create a new package and name it PK2_ID.
4) Then add MyDate.java class (Attached) to the package PK2_ID. You are required to read it carefully since you will use it. The class has 3 instance variables and includes 2 constructors and get & set methods.
You are not allowed to add or remove members from this class.
Part4.2 [7 marks] Develop a public abstract class Employee according to the following specifications:
1) The class has 3 private instance variables as:
- id as a string.
- name as a string.
- hiredate as an instance variable of class MyDate.
2) The class has a method setEmployee(). It has three arguments represent the class instance variables. It sets the instance variables to the given variable as arguments. It does not return any value.
3) The class has override the Object’s toString() method in order to return a string representation of the Employee instance variables.
You are required to copy and paste the code of the above class in your word file.
Part 4.3: [5 marks] Develop a public class FullTimeEmp to the following specifications:
1) The class inherits Employee class.
2) The class has one private integer instance variable month. It represents
the number of working months for the full-time Employee.
3) The class has a zero-argument constructor that invokes the default constructor of its super class. It sets the value of its instance variable
month to its default value.
4) The class has a multi-argument constructor that sets the value of its
instance variables to given values. It should invoke the method
setEmployee() from its super class.
5) The class has to override the Object’s toString() method in order to
return a string representation of the FullTimeEmp instance variables. It should invoke its super class toString() method, as:
Full-Time Employee: Name: Date: Month:
You are required to copy and paste the code of the above class in your word file.


M257/TMA Page 5 2015-2016/Spring
Part 4.4: [5 marks] Develop a public class PartTimeEmp to the following specifications:
1) The class inherits Employee class.
2) The class has one private double instance variable hour. It represents
the number of working hours for the Evening Employee.
3) The class has a zero-argument constructor that invokes the default constructor of its super class. It sets the value of its instance variable
hour to its default value.
4) The class has a multi-argument constructor that sets the value of its
instance variables to given values. It should invoke the method
setEmployee() from its super class.
5) The class has to override the Object’s toString() method in order to
return a string representation of the PartTimeEmp instance variables. It should invoke its super class toString() method, as:
Part-Time Employee: Name: Date: Hours:
You are required to copy and paste the code of the above class in your word file.
Part 4.5: [3 marks] Develop an Interface Comparable to the following specifications:
1) It has a public method printAll(). The method has no argument and returns a string representation to the class that will invoke it.
2) It has a public method fillDataFromFile(). The method has one String argument represent the name of the file and it does not return any value.
Part 4.6: [15 marks] Develop a public class Section to the following specifications:
1) The class has a private instance variable HashMap <Integer, Employee>, which represents a collection of employees of class Employee.
2) The class has a counterAll as a class variable that keeps the current number of objects that will be added to the collection. You need to decide the correct place to be able to increment it once an instance object is added into the collection.
3) The class has a zero-argument constructor that creates and initializes the HashMap <Integer, Employee>, instance object.
4) The class has a public method void addFullTimeEmp (Object) which is used to add an instance object of Full-time Employee of FullTimeEmp class into the collection.
5) The class has a public method void addPartTimeEmp (Object) which is used to add an instance object of Part-time Employee of PartTimeEmp class into the collection.
You are required to copy and paste the code of the above interface in your word file.
M257/TMA Page 6 2015-2016/Spring
6) The class implements Comparable interface. You are required to implement the body of the methods.
7) The class has to override the method printAll(). It returns either a string representation of the HashMap collection with all its different types of employees or a string message that “NO employees are available”.
8) The class has to override the method fillDataFromFile (String). It reads from a text file which its name given as argument of the method. Then fills the HashMap collection with all members in the text file.
You are required to copy and paste the code of the above class in your word file.
Part 4.7: [5 marks] Develop a public class TestT to the following specifications:
1) You are required to declare and create as an instance object of class Section.
2) You are required to read from the file datafile15.txt (Attached) and fill the collection of the instance object of class Section.
3) You are required to print the values in the collection on the screen.
. [2 marks]
Part 4.8: [8 marks]
Review Chapters 1, 3, 5 from M257 Material
Answer the following Question.
1) What is the relationship between Employee class and MyDate class? Explain your answer. [3 marks]
2) What is the relationship between Employee class and FullTimeEmp class? Explain your answer. [3 marks]
3) What is the relationship between Employee class and Comparable interface? Explain your answer.

ممكن احد يشرحه بالعربي
طويل ومعقد مرة
IT_Dana غير متصل   رد مع اقتباس
قديم 23-04-2016, 02:50 PM   #2
yaseralhs yaseralhs غير متصل
طالب جديد

 











افتراضي رد: مناقشة البارت 4 من الواجب


بالعكس سهل
yaseralhs غير متصل   رد مع اقتباس
قديم 23-04-2016, 06:26 PM   #3
IT_Dana IT_Dana غير متصل
طــالب

 










افتراضي رد: مناقشة البارت 4 من الواجب


اقتباس:
المشاركة الأصلية كتبت بواسطة yaseralhs مشاهدة المشاركة
بالعكس سهل
طيب ممكن شرحه بالعربي؟؟
IT_Dana غير متصل   رد مع اقتباس
إضافة رد

مواقع النشر (المفضلة)

أدوات الموضوع
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع


الساعة الآن 12:04 AM.


Powered by vBulletin® Version 3.8.1, Copyright ©2000 - 2020, Jelsoft Enterprises Ltd. TranZ By Almuhajir
جميع المواضيع والمشاركات تعبر عن وجهة نظر أصحابها
ولا تعبر باي شكل من الاشكال عن وجهة نظر منتديات AOUA
تصميم وتطوير : التكنولوجيا الماسية