PostGraduate
-thesis: String
+<<constructor>> PostGraduate()
+<<constructor>> PostGraduate(String,String,Long,double)
+setThesis(String): void
+getThesis(): String
+toString(): String
+show(): void
+interest(): double
Write the PostGraduate class as per the class diagram. Remember to call the super class methods or constructors as needed. show() method This method is void and displays the details of a PostGraduate object as follows:
Student details Name: Mpho
Student number: 201812345
Loan amount: 10000.0
Thesis: I do not know
Code the method interest(). This method returns a double value calculated as follows: loanAmount times 10%.
The answer to your question is provided in the image:
Comments
Leave a comment