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)
Get Free Quote!
284 Experts Online