Assignment
"Create a program that calculates
an employee's weekly gross salary,
tax withholding (which is 15% of gross
pay), and net pay, based on the number
of hours worked and hourly wage. Compute
any hours over 40 as time-and-a-half.
Use the appropriate decision structures
to create the program. Display the
weekly gross pay, tax withholding
and net pay (p.251 of book)
In her day job, Janey works as a
computer science teacher. She has
learned a little bit about providing
plans to the software team from Elizabeth.
She will try to follow the outline
already set up by Elizabeth in Project
1. The clearest way to state what
a product must do — so that it can
be designed, coded, and tested unambiguously
— is to write the "shall" statements
that the assignment contains. (It
is also the best way to make sure
the assignment is understood and to
identify any questions about it.)
These requirements (also called "shall"s)
consist of two kinds:
- Explicit requirements are
specifically contained in the assignment
or the specification of what the
product must do
- Derived, or implicit, requirements
are identified and defined (usually
by the software team) to capture
what is implied but not specifically
stated by the explicit requirirements.
This assignment has six explicit
requirements, and yields two derived
requirements.
Requirements
Explicit requirements:
- The Pay Calculator shall use appropriate
JavaScript control structures.
- Net Pay shall be calculated by
multiplying the hours worked and
the hourly wage.
- Time-and-a-half pay shall be calculated
for any hours worked over 40 hours
at the rate of 1.5 times the regular
pay rate.
- Tax Withholding shall be calculated
as 15% of Gross Pay.
- The Pay Calculator shall display
Gross Pay, Tax Withholding, and
Net Pay in textboxes.
- The Pay Calculator shall be stored
in a filed named GrossPay.html.
Derived requirements:
- The Pay Calculator shall request
the pay rate and hours worked from
the user in a textbox (reason: have
to get the information from the
user in some format)
- The Pay Calculator shall provide
a "Clear" button that erases the
current contents of the field. (reason:
The user has to have a way to start
over.)
Flowchart
(PDF) for program
These last two things we identified
as necessary for the Pay Calculator
to work correctly and be usable.
Team Process
On July 7 the team got together and
set up a timeline on how the Group
would handle Projects 2, 3,and 4.
Since Elizabeth was on vacation from
July 9, she turned over the role of
leader to Janey for Project 2. As
Janey will be on vacation for the
following project, Elizabeth will
accept the role of leader for Project
3.
On July 9 the team received the new
assignment. As team leader, Janey
began by outlining the program as
shown above and creating a flow chart
(PDF
of Flowchart). She then emailed
Elizabeth the plan for comment and
implementation.
Elizabeth wrote, commented, and tested
the code.
Documentation of Product
Description
[tbd]
Software Design
[tbd]
|