Write a program (propertyTax.java) to the following specification:
The local property tax is about to be collected by the government. You are to program an alternative way of calculating the property tax.
A user is asked for the following information about their home:
 Number of bedrooms·
 Is it urban or rural?·
 Is it terraced, semi-detached, or detached?·
Use the method specifications overleaf to develop the methods calculateSize and calculatePropertyTax.
Use the methods to calculate the property tax for a user and then display the value to the user.
Method name - calculateSize
Description - This method determines roughly how big the house might be.
It uses the following formula:
Initial size of the house is set as follows:
Terraced: 800 square feet
Semi-detached: 900 square feet
Detached: 1,000 square feet
Each bedroom adds 100 square feet.
E.g. Semi-detached house with 3 bedrooms = 900 + (3 x 100) = 1,200
Returns The estimated square footage
Parameters accepted:
1. Number of bedrooms
2. House type (i.e. Is it terraced, semi-detached or detached)
See the following for calculatePropertyTax:
Method name - calculatePropertyTax
Description - This method calculates the property tax as follows:
The tax is initially calculated as 15% of the square footage.
If the house is urban, the tax is multiplied by 1.25
Example:
Estimated square footage of 1,200 square feet.
Urban: 1,200 x 15% = 180
Urban, so multiply by 1.25... 180 x 1.25 = 225
Returns - The property tax amount
Parameters accepted:
1. Estimated square footage
2. Value indicating if house is urban or rural
The system must accept multiple properties, and give the Highest, Lowest, Average, and Total Property Tax Information. See sample run below.
-----------------------------------------------------------------------------------------------
Sample Run:
Number of Properties: 2
Property 1: Number of bedrooms? 3
Property 1: Terraced, Semi-detached or Detached (T/S/D)? S
Property 1: Urban or Rural (U/R)? U
Property 1: Property tax is €225.00
Property 2: Number of bedrooms? 3
Property 2: Terraced, Semi-detached or Detached (T/S/D)? S
Property 2: Urban or Rural (U/R)? R
Property 2: Property tax is €180.00
Highest Property Tax: Property 2 @ €225.00
Lowest Property Tax: Property 1 @ €180.00
Average Property Tax: €202.50
Total Property Tax: €405.00
----------------------------------------------------------------------------------------------
Marking Scheme:
1- JAVA File 100%
calculateSize Method 25%
Defined 5%
Correct Parameters 5%
Correct Return Type 5%
Correct Functionality 10%
calculateSize Method 30%
Defined 5%
Correct Parameters 5%
Correct Return Type 5%
Correct Functionality 15%
Accept Single Property 5%
Accept Multiple Properties 5%
Highest Property Tax 5%
Lowest Property Tax 5%
Average Property Tax 5%
Total Property Tax 5%
Validation & Correct Output Throughout 10%
Eg no empty inputs, numbers only for Bedrooms, correct House Type options, etc.
Correct Output 5%
Eg correctly Formatted decimals


 

 

    • 10 years ago
    A+ Work
    NOT RATED

    Purchase the answer to view it

    blurred-text
    • attachment
      propertyta.zip