CS139 Algorithm Development

Software Requirements Specification

Programming Assignment 1

Property Taxes

Due Monday, September 23 by 11:00pm 


Introduction

Purpose: This program is designed to calculate real estate taxes for the city of Harrisonburg.  

Objectives - At the conclusion of this exercise the student will demonstrate that they can:

Deadlines

Prerequisites

You have covered the material in Chapter 2 of Gaddis.  

Background

Property taxes in Harrisonburg are based on the value of the real estate that a person owns.  Property taxes pay for many of the services provided to those owners, such as schools, parks, etc.  The value is assessed for each property and owners pay a fee based on the assessed value of the property and the current tax rate.  For Harrisonburg city, that tax is rate is $.59 for every $100.00 of value.  The $100 of value is rounded, so that if a property was assessed at $159,949, the property tax would be paid on $159,900, but if a property was assessed at $159,999, then that property tax would be paid on $160,000.  

Example

If you are a homeowner with an assessed value on your home of $150,000, you would pay $885.00 in taxes.  ($1500 * $.59).  A second example, if your home was assessed at $142,650, you would pay $841.93 ($1427 * .59). 

Program Behavior

Your application must be named HarrisonburgTax.  

Your application must do these things:

  1. Your program will prompt for and read two input values.  They are:
    1. The name of the property owner as a String.
    2. The assessed value of the property as a double.
  2. Your application must calculate the amount of taxes for that property.
  3. Your application must output the tax amount in the correct format as specified below.  
HINT: The Math class provides a number of functions one of which will be helpful to this problem.  We will discuss how to use those in class on Monday.  The book has an appendix that contains all of these methods.  If you don't know how to use this class, you can simply code the problem without the rounding and then fill in the rest after Monday's class.

Output

  1. Output the heading, "Welcome to the Harrisonburg Property Tax Calculator" followed by the newline character.
  2. Output a blank line.
  3. Prompt for the input values. Output the newline character after reading the each input value and before the next prompt. Note: your input will be on the same line as the prompt.
    1. Your first input prompt must be the String, "Enter the assessed value of the property: "
    2. Your second input prompt must be the String, "Enter the property owner's name: "
  4. After reading all of the input values, output a blank line then the name of the property owner.  On the next line print out a tab character, then  "Taxes on XXXX are YYYY." Substitute the assessed value for XXXX and the tax amount for YYYY.  Format the amounts in normal currency format.  
Welcome to the Harrisonburg Property Tax Calculator
Enter the assessed value of the property: 
Enter the property owner's name:

Nancy Harris
    Taxes on $150,000.00 are $885.00.

Error handling

You will not need to perform any error handling.  Assume that the values being entered are a String and an double respectively.

Additional Program Requirements

  1. You must use variables for the values of the input parameters.
  2. You must use a constant for the property tax rate.
  3. In the documentation for the main method, you must supply three different examples of the calculation, showing the assessed value and expected tax.  This is worth 10 points.
  4. Your program must conform to standard Java programming standards and the additional standards for this class. See the Style Guide for your class.

Honor Code

This work must conform to the JMU Honor Code and the specific requirements of this class. NO help may be provided by any student to another student. Authorized help is limited to your textbook, the TAs for any CS139 or CS239 section, and the professor for your section. See collaboration policy.

Grading

        For submissions after:

HINTS