Question: java Creatc an abstract class RealEstate. then Create two sub classes: Resident and Lands For the Resident, create two subclasses: Ilouse and Flat For the

 java Creatc an abstract class RealEstate. then Create two sub classes:

Resident and Lands For the Resident, create two subclasses: Ilouse and Flat

java

Creatc an abstract class RealEstate. then Create two sub classes: Resident and Lands For the Resident, create two subclasses: Ilouse and Flat For the Iand, create two subclasses: vInvestment and Agriculture Real Estate Resident Land House Flat For The abstract class RealEstate, it should have the following instant variables: A variable to store view of type String A variable to store the area of type double A variable to store price per meter RcalEstate should have the following abstract methods calculatePrice that will calculate the final price of the realEstate Resident and Land should implement the abstract methods of RealEstate. Also they have the set and get for every instant variables. Resident has the following instant variables: . A variable to store age of type integer .A variable to store number of rooms of type integer .A variable to store number of balconies of type integer Land has the following instant variables .A variable to store road availability of type IBoolean. .A variable to store water availability of type Boolean. .A variable to store percentage of allowed buildings of type double Write all required set and get functions for al instant declarations. They must function according to the following scenarios: Note that you need to call the set methods of the Resident and Land within the sets of the subclasses (Flat, House, Investment, Agriculture) Note that you need to use the get methods of the Resident and Land within the sets of the subclasses (Flat, House, Investment, Agriculture) You need to use array of objects of type RealEstate to reference all the objects in your naiin * For House class: o Age must be at most 40. If the number entered exceeded 40, the set method(s) o number of rooms must be at least 2. If the number entered is less than 2, the set o number of Balconies must be from 1 to 8. If the number entered is less than 1 o Additional instant variables are should set it to 40 method(s) should set it to 2. then set it to 1 and if it was greater than 8 then set to 8 . number of stories (int) Include the set and get methods for the additional variables. more than 30, add 5 percent if the number of yards exceeded 2. mumber_of yards (int) o calculalcPricc) mcthod: should deduct 20 pereen of price value il the age was

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!