Question: INSY 4305/5309 Assignment #6 1. Write a class called House to hold details of the location (street number, street name, town) and the year of

INSY 4305/5309 Assignment #6

1. Write a class called House to hold details of the location (street number, street name, town) and the year of construction and the property tax. Write the appropriate contructor, selector and mutator methods. Also write a toString method to return the details of the house.

2. Write a subclass Home with additional instance fields for the name of the occupying family and the date they moved in. You should use the OurDate class we wrote in the class. Note the following: There should be two overloaded constructor methods:

public Home (int house, String street, String town, String family, OurDate movedIn)

and

public Home (int house, String street, String town, int yearConstructed, int propertyTax, String family, OurDate movedIn)

These should make use of the super keyword where appropriate. There should be the usual methods to set and extract the values of the new instance fields:

 setFamily getFamily setDateMovedIn getDateMovedIn

There should be a toString method that calls the toString method provided by the House class to return the details of the house and then return the text "has been occupied by FAMILY since DATE", with suitable values inserted.

You should make the three classes (House, Home, OurDate) part of the package insy.java.hw6.

3. Write a simple driver application that prompts the user to enter the appropriate information about a home, creates an instance of the Home class, and then prints out the details of that home. Make sure to use the appropriate import statement(s) to import the above classes.

Deliverables:

You should submit the four source code files (House.java, Home.java, OurDate.java, HomeDriver.java).

****PLEASE DO IT CORRECTLY THE FIRST TIME****

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!