Question: Evaluation This assignment shall be graded building streetName: String A rubric has been created in Canvas that identifies streetNumber: String the criteria that shall be


Evaluation This assignment shall be graded building streetName: String A rubric has been created in Canvas that identifies streetNumber: String the criteria that shall be used to evaluate your assignment submission yearBuilt: int +building (streetName: String, streetNumber :String, yearBuilt:int) +building () getStreetName String Description Follow the steps below to complete this assignment. gtStreet Number ) String getYearBuilt int Develop a solution that has three classes, as described in steps 2 through 4. The class diagram to the right shows the relationship between two of these classes. 1. house -numberBathrooms: double -numberBedrooms: int house (streetName: String, streetNumber:String, 2. Develop a class named building that has the following attributes and methods a. Attributes yearBuilt:int, numberBathrooms: double, numberBedrooms:int) house ) t-get NumberBathrooms ): double tgetNumberBedrooms : int i. streetName -a String value that identifies the name of the street this building is on. Any non-empty value is allowed for this attribute. streetNumber- a String value that contains the building's street number. Any non-empty value is allowed for this attribute yearBuilt-an int value that indicates the year the building completed construction. The year must be in the range [1975, 2019] ii. iii. b. Methods i. Constructor with three formal parameters-creates a building object by initializing the three attributes to their corresponding parameter variables Default constructor-creates a building object by initializing each attribute to a value you deem appropriate ii. iii. getStreetName() returns this building's street name iv. getStreetNumber) returns this building's street number. v. getYearBuilt()-returns this building's year built 3. Develop a class named house that has the following characteristics a. A house isa building b. Attributes i. numberBathrooms-a double value that identifies the number of bathrooms in this house This value must a number greater than zero with an optional fraction value of 0.5. For example, 1.5 and 0.5 are valid values while 2.7 and 0.4 are not valid Page 1 of2 ii. numberBedrooms- an int value that identifies the number of bedrooms in this house. Any number greater than or equal to zero is valid. c. Methods i. Constructor with five formal parameters -creates a house object by initializing the three building attributes and two house attributes to their corresponding parameter variables. ii. Default constructor- creates a house object by initializing each attribute to a value you deem appropriate. ii. getNumberBathrooms()- returns this house's number of bathrooms. iv. geNumberBedrooms) returns this house's number of bedrooms. Develop a class that contains a main method, and perhaps other methods, that use the building and house classes. The purpose of this class is to test the code in your building and house classes. 4. 5. Submit all of your Java source code files in a zip file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
