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:
- Input data from a keyboard.
- Do everything necessary to
create, debug, and run a java program.
- Use comments to delineate
each section of the program.
- Adhere to a Style Guide.
- READ
AND FOLLOW DIRECTIONS!!!!!
Deadlines
- Submit: September 21, 2009
by
11:00pm.
- Report: September 22, 2009
at
the beginning of class. A late penalty will apply for
each of the 2 deadlines. If the submit is late, the report is due the
next class or lab session day after successful submission.
Programs will not be accepted after 7 days late.
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:
- Your program will prompt for
and read two input values. They are:
- The name of the property
owner as a String.
- The assessed value of the
property as a double.
- Your application must
calculate the amount of taxes for that
property.
- 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
- Output the heading, "Welcome to the Harrisonburg Property Tax
Calculator"
followed by the
newline
character.
- Output a blank line.
- 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.
- Your first input prompt
must be the String, "Enter
the assessed value of the property: "
- Your second input prompt
must be the String, "Enter
the property owner's name: "
- 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
- You must use variables for
the values of the input parameters.
- You must use a constant for
the property tax rate.
- 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.
- 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
- Your program will be
evaluated both by its correctness and conformance to the required
elements.
- You will achieve a grade of
70 for a program that runs correctly
and produces exactly the required output in the required format.
- Documented examples - 10
points.
- The remainder (20 points)
will be
based on your conformance to the Style and other requirements of the
assignment. Review the Style
Guide before submitting your
program and the grade sheet which is produced by the submit system.
- All grades will be based on
100 points.
- You may submit any number of
times. The only one I will count is the one that corresponds to the
hardcopy report that you turn in.
- The hardcopy that you turn
in will be the formatted version that
I will check. Make sure it has no line wraps or other spacing
issues.
- Successfully submitted
programs that are late will be graded, then the late penalty is
assessed for each day late according to the following schedule.
For
submissions after:
- Sept 21 - 5 points
- Sept 22 - 15 points
- Sept 23 - 25 points
- Sept 24 - 35 points
- Sept 27 - 45 points
- Sept 28 - 100 points
HINTS
- Begin early.
Students run into trouble by waiting too long to start the
program.
- Understand the problem at
hand. Make sure that you follow
the requirements precisely. Don't add additional
"flourishes".
You will be downgraded.
- In the body of your main
method, outline your steps with comment lines for each part of the
project.