Question: need to write the complete code for the HouseForSale class , including all constructors and methods that are indicated by the diagram. If you include
need to write the complete code for the HouseForSale class, including all constructors and methods that are indicated by the diagram.
If you include things that are not required, marks may be deducted.
You can type more lines than may fit on the screen.


We are writing a system that could be used by a Real Estate Agency, to represent the properties that are available for purchase, or for renting. The following class diagram shows the domain classes required for the system: dass Real Estate Agency House Owner address: String suburb: String bedrooms int bathrooms: int carSpaces: int thouses 1 name: String phone: long Owner(string, long) + addHouseHouse): void + petNamel): Strine + getPhonel): long + getHousefint): vold + listAll Houses(: void + House(String String, int, int, int getAddress): String + getsuburb(): String + DetBedrooms(); int getBathrooms(); int getCarSpaces(); int House For Sale House For Rent pricelow int priceHigh: int + HouseForSale/String String, int, int, int, int,int) petPricelow:int getPrice High(); int weeklylentint available FromDate: String House For Rent|Strine, String, int, int, int, int, String) getAvailableFromDatel). String get WeeklyRent): int Q3. Assume that the constructor of the House class has the following signature line in its code file: public House(String _address, String _suburb, int _bedrooms, int _bathrooms, int _carSpaces) You now need to write the complete code for the House For Sale class, including all constructors and methods that are indicated by the diagram. If you include things that are not required, marks may be deducted. You can type more lines than may fit on the screen
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
