Post-Lab Assignment 1

Due before class on Monday, September 12, 2011

For this assignment you need to print a table with a list of information about music sales. For each piece of music, there will be a column for the artist, the title of the song or CD, the number of CDs sold in stores, the number of downloads, and the total sales. The output must be in the format below.


/////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
==                     Music Sales Summary                      ==
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////

Artist        Title                 CDs Sold    Downloads   Total
------         -----                --------    ---------   -----
Big Bopper    "Chantilly Lace"      3905        23978       27883   
Joey          "What's Up?"          140         355         495

The requirements for your program are as follows:
  1. You must print the border on the top as illustrated (using the slash and backslash characters). The border should be as wide as the table and symmetrical.
  2. You must use tab characters to get your columns aligned (the columns must be aligned but the spacing does not need to be exactly as above).
  3. You must use the + operator both for addition and string concatenation.
  4. The titles must be inside quotation marks.
  5. Make up your own information for the table (use short titles so you won't have too much trouble formatting the output)! The ones shown are just for illustration purposes. You need at lease 5 entries in the table (do not include the two above).
  6. Document your program by putting comments at the beginning that include:
    1. The full pathname for the source file of the program.
    2. The name of the author of the program (that is you!).
    3. The date the program is due.
    4. A brief description of the purpose of the program.

Begin by planning out your program. Think carefully about what your program will look like, what commands will you need, and how you will achieve the proper formatting. When you are ready to start, type it in using emacs and save it. Compile and run the program to make sure it works correctly.

Submission

To submit your code, upload a zip file containing your code to the course Inquire site.