Consider the UML below:
LoanInterest
A bank charges varying interest rates for loans made by students depending on whether they are undergraduate or post-graduate students. Undergraduates are charged 12% on the loan amount and postgraduates 10%. Interest on a small-business loan is 15%.
a) Write the Java code to declare the LoanInterest interface with the method interest().
b) Write the Java code for the definition of the Student class.
c) Write the Java code for the definition of the subclass UnderGrad.
d) Construct objects of each of the subclasses and assign them to an arraylist.
Comments
Leave a comment