Question: Address Create the following classes along with the specified instance data and methods. Make sure you use /** Javadoc comments */ to comment all public





Address Create the following classes along with the specified instance data and methods. Make sure you use /** Javadoc comments */ to comment all public classes, constructors, and methods (with the author, @version, @return, and @param tags as appropriate). Make sure the constructor validates data as specified. All constructors and mutators must throw an IllegalArgumentException when parameters do not match the expected format (listed below). The main method must try/catch/finally every object creation. Make all data (including parameters) final if it is not expected/desired to change. Avoid magic numbers; e.g. use public static final double PI = 3.14 instead of simply using 3.14). Class Instance Variables Methods Unit number (String: must Get methods for all instance variables be one to four characters) toString() to display the state of Address objects Street number(int must be O to 999999) Street name (String: must be one to twenty characters) Postal code (String: must be either length 5 or length 6) Property City (String: must be one to thirty characters) Price in USD (double, must Property will be a supertype that will hold common fields and behaviors of the subtype. be positive) Get methods for all instance variables Address (Address, not null) Set method for price Type (String: must be one of: "residence", toString() to display the state of Property objects "commercial", or "retail") Property ID (String: must be one to six characters) 1 Residence numberOfBedrooms (int: Subtype of Property (extends must not be less than 1) Property) Get methods for all fields swimmingpool (boolean: indicates presence of a toString() for displaying the state of Residence types pool) strata (boolean: indicates if part of a strata) Commercial loadingDock (boolean: Subtype of Property (extends indicates if it has a loading Property) dock) Get methods for all fields highwayAccess (boolean: toString() for displaying the state of Commercial types indicates if easy access to a highway) Retail squareFootage (int: the Subtype of Property (extends amount of floor space Property) available) Get methods for all fields customerParking (boolean: toString() for displaying the state of Retail types indicates if customer parking is available. AddressReader public static ArrayList
readAddressData(File file) throws FileNotFoundException: reads "address_data.txt" (provided) and adds Address objects to an ArrayList and returns it. Property Reader public static ArrayListStep by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
