Assignment 1

Due Monday, Sept 10 by 4:00pm

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).
  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 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 least 5 entries in the table.
  6. Document your program by putting comments at the beginning and before the main method as we did in lab. These should include:
    1. Comments at the beginning include the name of the author of the program (that is you!) using the @author tag, a brief description of the purpose of the program, and the date the program is due.
    2. Comments before the main method that includes the @param tag and a brief description of what the main method does (for now this is very repetitive - what you put here can be almost the same as what you put for the purpose of the class).

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 typing, you will need to create a package in Eclipse to hold your work for this assignment as follows:

  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 check the option to include the "main" stub so you don't have to type all that in).

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.