Lab 1: Post-Lab Assignment

Due Friday, September 9, 2005 at noon

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 books. For each book, there will be a column for the author, the title (which must be in quotes), 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.


/////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
==                      Book  List                      ==
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////

Author        Title            Price     Shipping   Total
------        -----            -----     --------   ------
Poe           "The Raven"      $12.50    $0.55      $13.05
William       "Hamlet"         $18.50    $1.75      $20.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) and you must use the + operator both for addition and string concatenation. The book titles must be inside quotation marks.
  3. 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 books.
  4. 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.

HAND IN: A printout of your program and email an electronic copy to the roanoke.edu mail account for your lecture instructor (hughes@roanoke.edu for Dr. Hughes or ingram@roanoke.edu for Dr. Ingram) with a subject of cs120 post1.