Java Reference
In-Depth Information
PROGRAMMING PROJECTS
Project 8.1. Implement a program that prints paychecks for a group of
student assistants. Deduct federal and Social Security taxes. (You may
want to use the tax computation used in
Chapter 5
. Find out about Social
Security taxes on the Internet.) Your program should prompt for the
names, hourly wages, and hours worked of each student.
Project 8.2. For faster sorting of letters, the United States Postal Service
encourages companies that send large volumes of mail to use a bar code
denoting the ZIP code (see
Figure 7
).
The encoding scheme for a five-digit ZIP code is shown in
Figure 8
.
There are full-height frame bars on each side. The five encoded digits are
followed by a check digit, which is computed as follows: Add up all
digits, and choose the check digit to make the sum a multiple of 10. For
example, the sum of the digits in the ZIP code 95014 is 19, so the check
digit is 1 to make the sum equal to 20.
Figure 7
A Postal Bar Code