Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Based on your description heres the UML class diagram PostGraduates name String matri...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started