Question: A finance company in Oman needs a system to calculate education loan amount and house loan amount for its client accurately and quickly. Develop a java program to calculate loan amount using the concept of method overriding based on the following instructions. Save the file/project as OmanYourID A) Class name: YourFirstName_House Member variables: value, period Member Method: – parametrized constructor to initialize member variables – to calculate and return house loan loan = 15% of (value * period) + value / 2 B) Class name: Education extends YourFirstName_House Member variables: amount, rate Member Method :
OOPs
In today's technology-driven world, computer programming skills are in high demand. The object-oriented programming (OOP) approach is very much useful while designing and maintaining software programs. Object-oriented programming (OOP) is a basic programming paradigm that almost every developer has used at some stage in their career.
Constructor
The easiest way to think of a constructor in object-oriented programming (OOP) languages is:
Question:
A finance company in Oman needs a system to calculate education loan amount and house loan amount for its client accurately and quickly. Develop a java program to calculate loan amount using the concept of method overriding based on the following instructions. Save the file/project as OmanYourID
A) Class name: YourFirstName_House
Member variables: value, period
Member Method:
– parametrized constructor to initialize member variables
– to calculate and return house loan
loan = 15% of (value * period) + value / 2
B) Class name: Education extends YourFirstName_House
Member variables: amount, rate
Member Method :
– Constructor to invoke the constructor of the super class and initialize amount, rate
– to calculate and return education loan
loan = (amount * rate) / (rate2 + 100)
C) Controlling class :
– To create object of YourFirstName_House and Education
– To display loan of YourFirstName_House
– To display loan of Education
Step by step
Solved in 6 steps with 5 images