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.
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 FamilyInsurance 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 FamilyInsurance.java, Car.java, Health.java and MyLoan.java.
**Find at least 5 relevant elements for each of insurance.**
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here