Write a java program named MyLoan that uses an abstract class named FamilyInsurance and subclasses which can display two different types of loans, Car and Health. And the cost per month for each loan....


Write a java program named MyLoan that uses an abstract class named
FamilyInsurance and subclasses which can display two different types of loans,
Car and Health. And the cost per month for each loan.
Please extend your program in question 3 by applying encapsulation and
polymorphism concepts. Understand the definition of both concepts and try as much as possible to convert your program and met with the
criteria. The criteria are as follows:
1) Superclass able to define reference of subclass.
2) The usage of private data field.
3) Subclass with two parents class. Please use implements.


Question 3<br>Write a java program named MyLoan that uses an abstract class named<br>Familylnsurance and subclasses which can display two different types of loans,<br>Car and Health. And the cost per month for each loan.<br>Each of the subclasses contains constructor which will sets the cost per month<br>based on the type of loan, and prompt the user any appropriate data entry for<br>the loan calculation. For example, Car loan, you might ask the user the age of<br>the car or want to protect windscreen or not, flood and etc. Same goes to Health<br>insurance. Please find the correct data for your program.<br>Include and abstract toData( method in the Familylnsurance class that<br>constructs a String containing all the required data. Ask the user for the type of<br>insurance and then display the appropriate Object. Save your files as<br>Familylnsurance.java, Car.java, Health.java and MyLoan.java.<br>Find at least 5 relevant elements for each of insurance.<br>

Extracted text: Question 3 Write a java program named MyLoan that uses an abstract class named Familylnsurance and subclasses which can display two different types of loans, Car and Health. And the cost per month for each loan. Each of the subclasses contains constructor which will sets the cost per month based on the type of loan, and prompt the user any appropriate data entry for the loan calculation. For example, Car loan, you might ask the user the age of the car or want to protect windscreen or not, flood and etc. Same goes to Health insurance. Please find the correct data for your program. Include and abstract toData( method in the Familylnsurance class that constructs a String containing all the required data. Ask the user for the type of insurance and then display the appropriate Object. Save your files as Familylnsurance.java, Car.java, Health.java and MyLoan.java. Find at least 5 relevant elements for each of insurance.
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here