Create a building class and two subclasses


Discuss the following:

Q: 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 number of bedrooms and baths. The School class contains additional fields for number of classrooms and grade level (for example elementary or junior high). All the classes contain appropriate get and set methods.

Place the Building, House, and School classes in a package named com.courses.buildings. Create an application that declares objects of each type and uses the package. Save the necessary files as Building.java, House.java, School.java, and CreateBuilding.java.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Create a building class and two subclasses
Reference No:- TGS01934457

Now Priced at $20 (50% Discount)

Recommended (95%)

Rated (4.7/5)