Home / Expert Answers / Computer Science / please-answer-in-java-code-nbsp-use-the-uml-diagram-below-figure-1-as-a-reference-in-the-packag-pa398

(Solved): Please answer in Java code.  Use the UML diagram below (Figure 1) as a reference. In the packag ...



Please answer in Java code. 

Use the UML diagram below (Figure 1) as a reference. In the package edu.ilstu, create an
abstract super class Person, two con
In the Test class, first, create two employee objects using the following listed arguments,
then print out the objects infor
Use the UML diagram below (Figure 1) as a reference. In the package edu.ilstu, create an abstract super class Person, two concrete subclass Employee and Student, and the driver testing class Test. If a method is an override method, you should include @Override. Person -name: String age: int gender: String + Person(String name, int age, String gender) + getName(): String +getAge(): int +getGender(): String +toString(): String +equals(Object obi): boolean Employee Student -hour: double major : String totalGrade: double -rate: double -payment: double -numberOfCourses: int + Employee(String name, int age, String gender, double hour, double rate) + Student(String name, int age, String gender, String major, double totalGrade, int numberOfCourses) +getAverageGrade(): double +getHour(): double +toString(): Sting getRate(): double getPayment(): double +toString(): Sting + equals(Object obj): boolean equals(Object obj): boolean Figure 1 In the Student class, if two students share the same name, age and major, we can consider they are the same person. The average grade equals the total grade divided by the number of courses. In the Employee class, if two employees share the same name, age, and payment, we can consider they are the same person. The payment equals rate x hour. In the toString() method, you can use DecimalFormat df = new DecimalFormat("#.##"); df.format(number) to format the decimal representation of the payment and average grade. In the Test class, first, create two employee objects using the following listed arguments, then print out the objects' information and compare these two objects to determine whether these two employees are the same person. name Rate age gender hour Object # 1 Linda Ward 26 Female 17.8 22.7 2 Linda Ward 26 Female 19.3 17.8 Next, create two student objects using the following listed arguments, then print out the objects' information and compare these two objects to determine whether these two students are the same person. Object name age gender major totalGrade numberOfCourses # 1 James 21 Male Computer Science 350 Smith 2 James 21 Male Information 281 Smith Technology


We have an Answer from Expert

View Expert Answer

Expert Answer


Here is the answer for your question in Java Programming Language. NOTE : According to the Chegg Policy, experts are allowed to answer a max of one question when given multiple questions in a single question. Answered as per the Chegg Policy. Apologi
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe