| CS150 -- Lab 5: Postal Bar Codes |
|
|
OverviewIn this lab, you will write a program to produce postal bar codes. AcknowledgementThis laboratory assignment is based on an exercise from Computing Concepts with C++ Essentials, 2nd ed. by Cay Horstmann. ProcedurePostal bar codes are used by the United States Postal Service to automate mail sorting. The bar codes are more easily scanned by a computer that the numbers we like to use. A bar code consists of a sequence of tall and short bars. There is a tall bar at the beginning and end of the bar code. Each digit is represented by 5 bars and an additional 5 bars are used to check the validity of the bar code. A total of 32 bars are used to represent a five digit zipcode. For example, the bar code for 53222 is: Each digit in the code is converted as follows: 1 -- :::|| To find the value of the check digit, you need to add all of the digits together and choose the check digit to make the sum a multiple of 10. (In the above example I chose the check digit to be 6 because 5+3+2+2+2+6=20.)
Lab Report (due beginning of week 8 lab)This lab report need not be self-contained. At a minimum, your report should include:
Your report should be typed, and as with any report you submit, correct spelling and grammar are required. Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well. Your grade will depend on quality of design and clarity of the code and documentation, as well as whether your program produces the correct results. If you have any questions, consult the instructor. |
| Office: CC-27C, Phone: 277-7339 |
| Last Updated: July 30, 2000 © 2000 Dr. Christopher C. Taylor |