House Class

This class inherits the instance variables and methods using the extends keyword. So when you go to make your House class, you will define it in the following way:

public class House extends Residence
{
   // ...
}

Since this class inherits everything from Residence, you can call Residence's constructor when you go to make a new House. To do this, you use super().

This calls the base class (or superclass's) constructor. Since we will give House 4 rooms, 4 walls, and a washer, you will define House's constructor like this:

public House()
{
   super(4, 4, true);
}

Since House inherits everything from Residence, you don't need to write any new methods at all! House has a propertyValue() and numWindows() method just like Residence because it is a type of Residence.

So, when you want to know the property value of a given House h, you would call:

h.propertyValue();

Similarly, House can also use the toString from Residence:

System.out.println(h);