Pay Calculator

Only available on StudyMode
  • Topic: Control flow, Input, Control flow diagram
  • Pages : 3 (534 words )
  • Download(s) : 54
  • Published : February 3, 2013
Open Document
Text Preview
WaveCrest Engineering|
CIS115, Lab Solution|
Pay Calculator (v4.0)|
|
|
|

This document specifies the complete analysis and design of the Pay Calculator program|

Contents
1.Problem Description (v3.0)3
2.Requirements Analysis3
3.Design4
3.1Hierarchy Chart4
3.2Main Module Flow Chart5
4.Design Pseudocode6
5.Program Desk Check9

Problem Description (v3.0)
A small startup software developer Company needs to create a program that will calculate the pay of its employees. For the third version of the program, the company wants the program to accept an employee’s name, the number of hours the employee worked, and the hourly pay rate. The program will then calculate the gross pay, display the employee’s name, number of hours worked, pay rate, and gross pay, and calculate and display the net pay of the person after taxes have been calculated and deducted. The user will then be able to continue calculating the pay for additional employees until the user decides to stop or until the maximum number of employees is reached. Note: changes in analysis and design from the previous version are highlighted in bold font. Requirements Analysis

Input Variables:
1. employeeName (string)
2. hoursWorked (real)
3. hourlyPayRate (real)
Processes:
1. displayOpeningMessage
2. getInput
3. calculateGrossPay
4. calculationNetPay
5. displayOutput
6. displayTerminationMessage
Output Variables:
1. netPay (real)
2. grossPay (real)
3. employeeName (string) //both an input and output
4. hoursWorked (real) //both an input and output
5. hourlyPayRate (real) //both an input and output

Design
Hierarchy Chart

Main Module Flow Chart

Figure [ 1 ]: Level 1 Control Flow Diagram

Design Pseudocode
Start//declare the variablesString employeeNameRealhoursWorkedRealhourlyPayRateRealgrossPay RealnetPayRealtaxRateInteger const MAX_EMPLOYEES = 100Integer...
tracking img