Create a Building class and two subclasses, House and School. The Building class contains fields for square footage and stories. The House class contains additional fields for the numbers of bedrooms and baths. The School class contains additional fields

computer science

Description

Create a Building class and two subclasses, House and School. The Building class contains fields for square footage and stories. The House class contains additional fields for the numbers of bedrooms and baths. The School class contains additional fields for the number of classrooms and grade level (e.g. elementary or junior high). All classes contain appropriate get and set methods and overloaded constructors allowing to accept and set the field data values. Create an application driver class ShowBuildings, which creates the objects from the House and School classes, accepts the user’s input for the fields of proper object type and pass those to the object fields for storage. Display the content of the every data field in the created object. Compile, run, and check the results. Submit the following: Four .java files (Building.java, House.java, School.java, ShowBuildings.java)


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.