ABC Company helps its clients to find a quick and easy analysis for better investment decisions. It would like to include the ways to calculate the evaluated price and investment analysis for the two types of property, ‘Condo’ and ‘single-family home (SFHome). Implement the class property based on the following specification. The class has - Instance variables: ▪ address that holds the address of the property and is of type string. ▪ ZoneCode which is an integer indicating the zone of the property. (possible values 1, 2, and 3) ▪ NoOfBedrooms that holds the number of bedrooms in the property. ▪ YearofConstruction an integer to hold the year of construction ▪ RiskFactor which is a float number in the range(0.0,1.0) for the risks related to investments in real estate market. ▪ Type indicates if the type of the property is a Condo or a SFHome. - At least three constructors, a default constructor, a parametrized constructor (which will accept enough parameters to initialize all the attributes of the created object from this class), and a copy constructor. Note (for implementing part b and c of Question 1): An object creation using the default constructor must trigger the default constructor of its ancestor classes, while creation using parametrized constructors must trigger the parametrized constructors of the ancestors. - Accessor and Mutator methods o IntheaccessormethodstosettheriskFactorandzonecode,checkthevalue/range,ifthey are not valid, display appropriate message and exit the system. - toString and equals methods: o Note1: toString method must return clear description and information of the object (display each attribute of the object in a separate line) o Note2: You are always overriding these methods in the derived classes that you need to implement in part b and part c of this question) - AnalyzeInvestment that returns as a double the value computed for the property investment analysis. - EvaluatePrice that returns as a double the price calculated based on the given input data. AnalyzeInvestment and EvaluatePrice are calculated according to the following formulas:
PLZ help with the following: In JAVA
ABC Company helps its clients to find a quick and easy analysis for better investment decisions.
It would like to include the ways to calculate the evaluated price and investment analysis for the two types of property, ‘Condo’ and ‘single-family home (SFHome).
Implement the class property based on the following specification. The class has
-
-
- Instance variables:
-
▪ address that holds the address of the property and is of type string.
-
▪ ZoneCode which is an integer indicating the zone of the property. (possible
values 1, 2, and 3)
-
▪ NoOfBedrooms that holds the number of bedrooms in the property.
-
▪ YearofConstruction an integer to hold the year of construction
-
▪ RiskFactor which is a float number in the range(0.0,1.0) for the risks
related to investments in real estate market.
-
▪ Type indicates if the type of the property is a Condo or a SFHome.
-
-
- At least three constructors, a default constructor, a parametrized constructor (which will accept enough parameters to initialize all the attributes of the created object from this class), and a copy constructor.
Note (for implementing part b and c of Question 1): An object creation using the default constructor must trigger the default constructor of its ancestor classes, while creation using parametrized constructors must trigger the parametrized constructors of the ancestors. -
- Accessor and Mutator methods
o IntheaccessormethodstosettheriskFactorandzonecode,checkthevalue/range,iftheyare not valid, display appropriate message and exit the system.
-
- toString and equals methods:
o Note1: toString method must return clear description and information of the object
(display each attribute of the object in a separate line)
o Note2: You are always overriding these methods in the derived classes that you need to
implement in part b and part c of this question)
- AnalyzeInvestment that returns as a double the value computed for the property
investment analysis.
- EvaluatePrice that returns as a double the price calculated based on the given input
data.
AnalyzeInvestment and EvaluatePrice are calculated according to the following formulas:
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images