[MSOE Homepage]

Dr. Taylor's MSOE homepage

Courses

Unix is a Four
Letter Word

My Photo Album

My Personal Homepage

CS-100 Main page

CS-100 -- Lab 5: Postal Bar Codes

Fall Quarter 1999



Electrical Engineering and Computer Science Department
Dr. Christopher C. Taylor

S-331, 277-7339

www.msoe.edu/~taylor/

Purpose

The lab is designed to further your programming skills and become more familiar with writing and calling your own functions.

Assignment

  • Write a function when passed a one character string, will return the corresponding five character bar code string.
    • Use : for half bars, and | for full bars.
    • If the one character string passed in does not represent a digit, then return the following error string: :::::
    • See Exercise P5.18 in the textbook for more information on postal bar codes.
  • Write a program that asks the user for a zip code and prints the bar code. Your program should call the function described above.
  • After each zip code to bar code translation, your program should ask the user whether or not he/she wishes to enter another zip code.

Programming consideration: It is always good in program design to consider potential modifications that may be required a some later date. Be sure to keep this in mind when designing your program.

Lab report (due 4:30pm Tuesday, October 19, 1999)

This lab report need not be self-contained. At a minimum, your report should include:

  • A brief discussion of what you learned and what problems you encountered.
  • Documented source code (you may wish to include this at the end of your report)
  • Sample output from your program.
  • Any suggestions on how the lab could be improved.

As with any report you submit, correct spelling and grammar are required. In addition, your report should be submitted electronically following the Electronic Submission Guidelines. (You may wish to consult the sample report before submitting your report.) 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.

If you have any questions, consult the instructor.


This page was created by Dr. Christopher C. Taylor copyright 1999.