Due: Friday September 28, 9:00 a.m. - No late assignments will be accepted
You will build a simple program to model houses for a real estate office. The properties of each house are:
If the house is listed then there is no buyer.
If the house is unlisted, there is no buyer or price.
If the house is sold then all the information is relevant, and the price is the selling price.
You will complete the class House
, which we have begun.
We have provided a second class TestHouse
that
demonstrates how the methods in House
are called. You
must not make any changes to TestHouse
. You must
not change any of the House
methods or variables that
we provide. This will
greatly constrain your design choices for House
. This is
intentional.
TestHouse.java
and House.java
and read them
carefully. Class TestHouse
contains a
main
method that makes use of class
House
.
TestHouse
and include the
two .java
files. Remember to set the CodeWarrior
Target Settings so that TestHouse
is the main
class.
House.java
is
incomplete. Finish it. We have provided the method comments for
five methods, and you need to write those methods. It's like a
jigsaw puzzle: you can figure out what those five methods should
be called and what their parameters are by looking at what happens
in TestHouse.java
and by carefully reading the method
comments. You also need to figure out the last instance variable;
there's a comment for that, too.
House.java
file
electronically for marking. You do not need to submit
TestHouse.java
, because it hasn't changed. Yo do
not need to submit any project files or .class
files. Reread the rules for assignment
submission to be certain you followed them.