Question: Please do the java code for me 2. A class hierarchy rooted in the class PostGraduates includes two subclasses namely Research and Coursework. The attributes

Please do the java code for me

2. A class hierarchy rooted in the class PostGraduates includes two subclassesnamely Research and Coursework. The attributes shared in common by these subclasses

2. A class hierarchy rooted in the class PostGraduates includes two subclasses namely Research and Coursework. The attributes shared in common by these subclasses include the name, matricno, and programName, plus the assessor methods needed by the attributes, as well as the toString() method. The Research student needs an attribute for numofSem that represent the number of semester he/she has registered for the program, and the corresponding methods for accessing and changing this variable. The Coursework student should have an attribute for credithours that represent the number of credits that the student takes that semester, as well as its accessor method. Besides there should be a method named calculateFees() and toString() in cach subclasses. The fee for the Research student depends on the program name ie RM1,500 for Masters by Research and RM2,000 for the PhD program. The fee for the Coursework is calculated by multiplying the credit hours with RM50.00 per credit. Draw the UML class diagram for the classes. Implement Coursework object, and then invoke their toString()) methods. The program Write a test program that instantiates a Research and the (Suatu hirarki kelas yang akarnya ialah kelas PostGraduates mengandung the classes. must apply a polymorphism concept. duasubkelas, bernama Research dan Coursework Aribut yang dikongsi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Based on your description heres the UML class diagram PostGraduates name String matri... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!