Question: I need this for java programming Delline a class call it Room) that has two instance variables of float type representing the length and ota-The

I need this for java programming

I need this for java programming Delline a class call it Room)

Delline a class call it Room) that has two instance variables of float type representing the length and ota-The cass should have a public static varable of float type representing the number of rooms The class shouild have the tolicwing methots a. Default constructor that will initialce instance variables to o h. Constructor that will initialize the instance variables to the parameter values c The constructor should increment the static variable when an object of the class is defined or instantiated Accessors getlength, getwidth e Mutators setlength, setwidth set the length and width using the parameter value area) that will compute and return the area s perimeter) that will compute and return the perimeter h tosong0 that w retum, a string nicating lengt, width, area and perimeter Wirite a Java application to test the Rcom class above. Define several Room objects and make calls to the diferent methods write another class name iz House. A House object should have 5 Room objects (bedRooml, bedroom2 isingRoom ktchen and diningRoom) as instance variables. The class should include the following methods totaSprtl that will compute and return the total square feet for the house toStringo that will return a string representing the House object-rooms room areas and total square feet L setRoom0 that will set the information for a Room object using a Room object as a parameter with specified type for the room. The Room object will be updated based on the room type (bedRoom1, bedRoom2 livingRoom kitchen and diningRoom

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!