Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Next Generation Databases NoSQLand Big Data

Authors: Guy Harrison

1st Edition

1484213300, 978-1484213308

More Books

Students also viewed these Databases questions

Question

What is a verb?

Answered: 1 week ago

Question

Have roles been defined and assigned?

Answered: 1 week ago