Answered step by step
Verified Expert Solution
Link Copied!

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

imageimage

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions