Please do the java code for me 2. A class hierarchy rooted in the class PostGraduates includes
Fantastic news! We've Found the answer you've been seeking!
Question:
Please do the java code for me
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
Below is the UML diagram So the java code will be class PostGraduate private String name private String matricNo private String programName public Pos... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
An airline company wants to create an online air ticket purchase for its customers. The company wants to attract customers to participate or purchase from its website by offering a discount to the...
-
"Fortran, Algol and Lisp invented most programming language concepts 50 years ago; adding the concept of object-orientation suffices to explain all programming languages to date". To what extent is...
-
Fill in the blanks with the proper method names to deserialize an object. (Choose two.) A. writeObject in the first blank B. writeResolve in the first blank C. readObject in the first blank D....
-
Ontario Children's Choir needs a fleet of vans to transport the children to singing engagements throughout Ontario. Ford offers the vehicles for a single payment of $120,000 due at the end of four...
-
In 2011, home prices and mortgage rates fell so far that in a number of cities the monthly cost of owning a home was less expensive than renting. The following data show the average asking rent for...
-
A table sits on the floor, and a vase containing water and flowers sits on top of the table. All objects are at rest. Identify all forces exerted on the table, and describe how these forces are...
-
Bluestem Supply does not segregate sales and sales taxes at the time of sale. The register total for March 16 is $10,388. All sales are subject to a 6% sales tax. Compute sales taxes payable and make...
-
discuss the role of cognitive biases and heuristics in influencing persuasive communication strategies ?
-
For the differential manometer shown in Fig. 3.27, calculate the pressure difference between points A and B. The specific gravity of the oil is 0.85. 10 in 32 in Oil Water 9 in el
-
(20 pts.) 2SAT. In the 2SAT problem, you are given a set of clauses, where each clause is the disjunction (OR) of two literals (a literal is a Boolean variable or the negation of a Boolean variable)....
-
Jamee owns a small hair salon. This is their income statement for the month of July. They had 235 customers this month. What is their full cost on their contribution margin for the month of July?...
-
The United States saw waves of immigration and several changes in immigration law from the mid-1860s to the late 20th century. Discuss the impact immigration, immigration laws, and the backlash to...
-
what strategies could you use to prevent the threats from being an issue in a study you are conducting? What approach will help overcome sampling bias and observer bias to equalize the chance you...
-
How do cultural norms and values shape patterns of social behavior and interpersonal relations, influencing everything from familial structures to modes of governance and economic exchange?
-
Problem 2: A 30-tooth pinion drives a 128-tooth gear. Given a diametral pitch of 16 and a pressure angle of 25, find the contact ratio. How does this ratio compare to the recommended contact ratio?...
-
What is the molecular weight of a gas if 15 g occupies a volume of 4 liters at a temperature of 30 C and a pressure of 795 mmHg?
-
To help you become familiar with the accounting standards, this case is designed to take you to the FASBs Web site and have you access various publications. Access the FASBs Web site at...
-
Diego, age 28, married Dolores, age 27, in 2012. Their salaries for the year amounted to $46,479 and they had interest income of $3,500. Diego and Dolores' deductions for adjusted gross income...
-
Jan has two jobs during 2012. One employer withheld and paid FICA taxes on $66,600 of Jan's salary, and the other employer withheld and paid FICA taxes on $44,400 in salary paid to Jan. Calculate the...
-
Cedar Corporation has an S corporation election in effect. During the 2012 calendar tax year, the corporation had ordinary taxable income of $200,000, and on January 15, 2012, the corporation paid...
-
Consider the system of Fig. P4.4-5. The filter transfer function is \(D(z)\). (a) Express \(C(z)\) as a function of \(E\). (b) A discrete state model of this system does not exist. Why? (c) What...
-
Find the \(z\)-transform of the following functions. The results of Problem 4.5-3 may be useful. (a) \(E(s)=\frac{6 \varepsilon^{-0.3 T s}}{(s+1)(s+2)(s+3)}\) (b) \(E(s)=\frac{4 \varepsilon^{-0.6 T...
-
Repeat Problem 4.8-1 after replacing the digital filter with this transfer function: \[ D(z)=\frac{z-0.5}{(z-0.8)(z-1)} \]
Study smarter with the SolutionInn App