Assignment 1

Due Wednesday, Sept 12 4:00pm

For this assignment you need to print 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, the price, the shipping/handling fee, and the total cost. The output must be in the format below.


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

Author        Title            Price     Shipping   Total
------        -----            -----     --------   ------
Poe           "The Raven"      $12.50    $0.55      $13.05
Shakespeare   "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)
  3. You must use the + operator for 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 books.
  6. Document your program by putting comments at the beginning that include:
    1. The name of the author of the program (that is you!).
    2. The date the program is due.
    3. A brief description of the purpose of the program.

Begin by thinking 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 typing, you will need to create a package in Eclipse to hold your work for this assignment.

  1. Launch Eclipse.
  2. Highlight the Assignments project in the workbench.
  3. Open the File menu, expand the new option and select package.
  4. Name the package "assign1".

Follow a similar process to create a class within the package. This class will hold the source code for your program. (don't forget to include the "main"stub.)

HAND IN: A printout of your program and email an electronic copy to your professor (hughes@roanoke.edu for Dr. Hughes or ingram@roanoke.edu for Dr. Ingram) with a subject of cs120 Assign1.

Academic Integrity Reminder!!! Programming assignments are to be your own work. You may get help on the specifics of the assignment from no one except the instructor. You may not show your program to anyone or look at anyone else's program or share ideas with anyone about how to write the program.