Lab 1: Post-Lab Assignment

Due before class on Friday, September 10, 2010

Get into your lab1 subdirectory and create a new directory named PostLab. The assignment is to write a Java program that prints a table with a list of information about at least 5 DVDs. For each DVD, there will be a column for the title (which must be in quotes), an actor, the price, the shipping/handling fee, and the total cost. The output must be in the format below. You may make up the information in the table.


////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\
==                      DVD  List                     ==
\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////

Title             Actor       Price    Shipping   Total
-----             ------      -----    --------   ------
"Citizen Kane"    Welles      $14.50   $0.55      $15.05
"Casablanca"      Bogart      $16.50   $1.75      $18.25
      

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).
  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 book 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 5 DVDs other than the ones 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.

First plan your program, then type it in using emacs and save it in the PostLab directory. Compile and run the program to make sure it works correctly.

Submission

To submit your code cp a tgz file containing your java file to the directory:

   /home/staff/bouchard/CPSC120/post1