Page 168, problem 4.6 in Programming in Visual Basic 6.0 by Julia Bradley and Anita Millspaugh

Piecework workers are paid by the piece. Workers who produce a greater quantity of output are often paid at a higher rate.

FORM: Use text boxes to obtain the person's name and the number of pieces completed. Include a Calculate command button to display the dollar amount earned. You will need a Summary button to display the total number of pieces, the total pay, and the average pay per person. A Clear button should clear the name and the number of pieces for the current employee.

Include validation to check for missing data. If the user clicks on the Calculate button without first entering a name and number of pieces, display a message box. Also, you need to make sure to not display a summary before any data are entered; you cannot calculate an average when no items have been calculated. You can check the number of employees in the Summary event procedure or disable the Summary command button until the first order has been processed.

Pieces Completed

Price Paid per Piece for All Pieces

1 - 199

.50

200 - 399

.55

400 - 599

.60

600 or more

.65