CSS 341 - Machine Problem #1    (version October 2, 2009)

Problem Solving with Decision Constructs

Using HTML for User Interface


Due time: Sat, October 17, noon.  (50% credit up to 24 hr late)

               

 

In this machine problem we will practice using if-else conditional construct, working in a HTML document, implement a useful program to help the Keystone Daily Newspaper¡¦s delivery department.

 

The Keystone Daily Newspaper¡¦s Delivery Department hires many newspaper delivery personnel. These personnel are paid according to the number of deliveries they made in each week. The following is the chart that describes how delivery personnel should be paid:

 

 

Number of deliveries

 made in a week

Rate

Up to 50

10 cents per delivery

51 to 100

$6.00 plus 12 cents for each over 50

101 to 150

$13.00 plus 15 cents for each over 100

151 to 200

$22.50 plus 20 cents for each over 150

201 to 300

$35.50 plus 35 cents for each over 200

301 and over

$75.50 plus 47 cents for each over 300

 

Develop a HTML based web page, including the necessary scripts that use if-else statements to accept as input the number deliveries made and compute and show the amount that delivery personnel should be paid. Your program should check (validate) input and echo to the user politely when input is not valid. Please do spend time formatting your html page ensuring user friendliness and usability of your system.  It would not be a bad idea for your web page to display the information in the table above that is being used.  The user can easily check the calculation that way.

This programming assignment contributes 2.7% towards your final grade for this course.

 

 

**WARNING**: You must work in groups of 2 persons!

 

 

The following table is an example of the actual output data that might be reported.  The web page should be labeled nicely, explaining what information is being provided.  Example output:

 

Deliveries made

Salary Earned

48

$4.8

76

$9.12

137

$18.55

159

$24.3

279

$63.15

456

$148.82

 

 

I will do the initial ¡§black box¡¨ test of your code by opening it with the IE browser: make sure it works!

On a second file in your submission,  briefly answer three questions:  1) Give a flow chart for the vbscript program embedded in this html file (see Gaddis Ch 4 for examples) ; 2) provide a short paragraph describing the strategy you used to test or debug this program; and 3) provide a short paragraph describing the programming procedure(s) you used as a team.