منتديات طلاب الجامعة العربية المفتوحة - الجامعة السعودية الالكترونية
حل واجبات الجامعة العربية المفتوحه - الجامعة السعودية الالكترونية -
شرح كورسات - مراجعات - فيديوهات - مراجعات قبل الامتحانات
حلول واجبات الجامعة العربية المفتوحة
لجميع تخصصات الجامعة ولجميع فروع الجامعة
حلول واجبات – مشاريع تخرج – ملخصات هامة

WhatsٍِِِApp: 00201102862484
professor.tma@gmail.com
حلول مضمونة وغير مكررة وغير متشابهة لجميع واجبات الجامعة
متوفرمدرسين ومدرسات لجميع المواد والتخصصات
KSA-Kuwait-Bahrain-Oman-Jordon-Lebanon-Egypt


حل واجبات الجامعة العربية المفتوحة - الجامعة السعودية الالكترونية - مع الشرح لكل واجب
 
الرئيسيةالبوابةس .و .جبحـثالأعضاءالمجموعاتالتسجيلدخول

مع أفضل نخبة من الاساتذة والمهندسين - حل واجبات - شرح اونلاين - ملخصات - مراجعات - مشاريع تخرج - الجامعة العربية المفتوحة بجميع فروعها - الجامعة السعودية الالكترونية - جامعة الملك فيص وجامعة الملك فهد وجامعة ام القرى وجامعة السلطان قابوس وجامعة الملك فهد

شاطر | 
 

 واجب M257 Develop a public abstract class Employee in the above package according to the following specifications

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

عدد المساهمات : 1641
تاريخ التسجيل : 06/02/2012

مُساهمةموضوع: واجب M257 Develop a public abstract class Employee in the above package according to the following specifications   الثلاثاء أكتوبر 31, 2017 12:23 am

Part 1 [5 marks]
In this part you are required to specify the version of JDK and IDE that you will use to
solve this TMA.
Student should write the version of JDK and IDE that he/she used.
Part 2 [75 marks]
Part2.1
In this part you are required to:
1) Open the given files MyDate.java and MyName.java classes and Usable.java
interface and read them carefully. Their specifications were added above the header
of each class.
Part2.2 [10 marks]
You are required to do the following:
1) Create M257_TMA_Fall17_ID Project on NetBeans IDE.
2) Create a new Package in the above project. Name it as MyTMA_ID, and then
you are required to add the following classes and interface.
3) Create a new class with name MyDate.java and then copy the given code in its
body.
4) Create a new class with name MyName.java and then copy the given code in its
body.
5) Create a new Interface with name Usable.java and then copy the given code in
its body.
These classes and the interface should be kept in the Package and not moved out.
You are not allowed to add or remove from them.
Part2.3 [10 marks]
Develop a public abstract class Employee in the above package according to
the following specifications:
1) The class has 4 private instance variables as:
- id as a string.
- fullname as an instance variable of class MyName.
- hiredate as an instance variable of class MyDate.
- payment as a double variable.
2) The class has a method setEmployee(). It has four 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 the getter and setter methods for its instance variable
payment and id.
4) The class has override the Object’s toString() method in order to return
a string representation of the employee instance variable.
5) The class has an abstract method calcFullPayment(). It has no
arguments and it calculates and returns the payment of the employee.
You are required to copy and paste the code of the above class in your word file.
M257/TMA Page 4 2017/2018 Fall
Part 2.4: [10 marks]
Develop a public class MonthlyEmployee in the above package to the
following specifications:
1) The class inherits Employee class.
2) The class has one private integer instance variable day. It represents the
number of working days for the MonthlyEmployee.
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
day 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 MonthlyEmployee instance
variable. It should invoke its super class toString() method, as:
Monthly Employee: Name: Date: Days: Payment=
6) The class has to override its super class abstract method by and
implementing the body of the method calcFullPayment() for calculating
the full payment as:
The full payment = payment * day.
You are required to copy and paste the code of the above class in your word file.
Part 2.5: [10 marks]
Develop a public class CarEmployee in the above package to the following
specifications:
1) The class inherits Employee class.
2) The class has one private integer instance variable hour. It represents
the number of working hours for the CarEmployee.
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 CarEmployee instance variable. It
should invoke its super class toString() method, as:
Car Employee: Name: Date: Hours: Payment=
6) The class has to override it super class abstract method by and
implementing the body of the method calcFullPayment() for calculating
the full payment as:
The full payment = payment * hour.
You are required to copy and paste the code of the above class in your word file.
M257/TMA Page 5 2017/2018 Fall
Part 2.6: [20 marks]
Develop a public class Team in the above package to the following
specifications:
1) The class has a private instance variable HashSet <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 HashSet <Employee>instance object.
4) The class has a public method void addMonthlyEmpToTeam (Object)
which is used to add an instance object of Monthly Employee of
MonthlyEmployee class into the collection.
5) The class has a public method void addCarEmpToTeam (Object) which
is used to add an instance object of Car Employee of CarEmployee class
into the collection.
6) The class has to implement Usable interface.
7) The class has to override a String printAll() which returns either a
string representation of the HashSet of items and all its different types of
employees or a string message that “NO employees are available”.
Cool The class has to override a void fill() which reads the data from the
given text file and then saves the employees in the HashSet
<Employee> collection. Make the name of the file as
“EmployeeFall17_ID.txt".
9) The class has to override a void clear() which clears the HashSet
<Employee> collection.
10) The class has to override a double calcFullPaymentAverage () which
calculates and returns the average of the full payment for all items in the
HashSet <Employee> collection.
You are required to copy and paste the code of the above class in your word file.
Part 4.7: [10 marks]
Develop a public class EmployeeGUI in the above package to the following
specifications:
1) The class inherits JFram class.
2) The class has an instance object from the Team class.
3) The class has 2 labels.
a. The average label which contains the average of the full payment
for the employees in the collection.
b. The number of employees label which contains the number of the
employees in the collection.
4) The class has an instance of the text area component to display all
employees in the team on the screen.
M257/TMA Page 6 2017/2018 Fall
5) The class has to implement ActionListener interface.
6) The class has 2 buttons that react to the user action.
a. Get data from file button which displays all the employees in the
team in the textarea component.
b. Clear button which clear all the components in the EmployeeGUI
class.







_________________
الإجــابة النمــوذجية
----------------------

[عزيزي الزائر يتوجب عليك التسجيل لمشاهدة الإجابة النموذجية ، للتسجيل اضغط هنا] || الكاتب: [عزيزي الزائر يتوجب عليك التسجيل لمشاهدة الإجابة النموذجية ، للتسجيل اضغط هنا] || المصدر: [عزيزي الزائر يتوجب عليك التسجيل لمشاهدة الإجابة النموذجية ، للتسجيل اضغط هنا]






خدمات مجانية – حلول واجبات الجامعة العربية المفتوحة
لجميع تخصصات الجامعة ولجميع فروع الجامعة
حلول واجبات – مشاريع تخرج – ملخصات هامة
http://quiz.123.st/
Watsapp: 00201102862484

professor.tma@gmail.com
مع نخبة من أفضل الاساتذة والمهندسين المتخصصين
حلول مضمونة وغير مكررة وغير متشابهة لجميع واجبات الجامعة
متوفرمدرسين ومدرسات لجميع المواد والتخصصات
KSA-Kuwait-Bahrain-Oman-Jordon-Lebanon-Egypt
الرجوع الى أعلى الصفحة اذهب الى الأسفل
معاينة صفحة البيانات الشخصي للعضو http://quiz.123.st
 
واجب M257 Develop a public abstract class Employee in the above package according to the following specifications
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
» Immunoglobulins
» sociolinguistic variation
» مجموعة كتب لتعلم الانجليزية + ملفات صوتية

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