Docsity

ITK 168 Assignment 2: Creating an Interactive CD Store Program - Prof. Mary Califf, Assignments of Information Technology

Toggle sidebar
bg1
ITK 168, Califf Fall 2004
ITK 168 Program 2
Due Date: Friday, September 24 at start of class.
The Problem:
Your task in this assignment is to write an interactive program that prints out a table
showing customer purchases from the Corner CD Collection. The table will list the
customer number, customer name, number of items purchased, subtotal, tax, and total
purchase amount. There are also grand totals at the bottom of the table.
Specifics:
1. The program will collect and display data for three customers.
2. The program should ask for the user’s first name and last name. Users should
be able to enter their names using any combination of upper and lower case
letters. The name will be displayed using all upper case letters in the table.
3. Each customer will be assigned a customer number made up of their initials
plus a random number between 1 and 5000.
4. The program also should ask for the number of items purchased.
5. You can assume that all data entered will be of the correct type.
6. The tax rate should be 7.5% and the cost of each poster is $14.95. These
should be constants throughout the program.
7. Dollar amounts should be displayed in correct format with dollar signs and
two places after the decimal point.
8. Your screen should look similar to the Sample Program Run on the back of
this page.
Requirements:
Name your program CDStore.java.
Submit just the CDStore.java file using Web Submit under project 2. Be sure that
you submit your program to section 7.
Turn in a printout of the final version of your source code that exactly matches
file you submitted.
The program must follow the coding guidelines handed out in class.
The program should be well commented
Planning
On Friday, September 17, you must turn in a plan for your program: a list of the tasks that
the program must accomplish, in order, written in English. It does not have to be in
complete sentences, but it does have to be legible, and it does have to make sense. Note
that lists are not paragraphs.
1
pf3
pf4

Partial preview of the text

Download ITK 168 Assignment 2: Creating an Interactive CD Store Program - Prof. Mary Califf and more Assignments Information Technology in PDF only on Docsity!

ITK 168 Program 2

Due Date: Friday, September 24 at start of class. The Problem: Your task in this assignment is to write an interactive program that prints out a table showing customer purchases from the Corner CD Collection. The table will list the customer number, customer name, number of items purchased, subtotal, tax, and total purchase amount. There are also grand totals at the bottom of the table. Specifics:

  1. The program will collect and display data for three customers.
  2. The program should ask for the user’s first name and last name. Users should be able to enter their names using any combination of upper and lower case letters. The name will be displayed using all upper case letters in the table.
  3. Each customer will be assigned a customer number made up of their initials plus a random number between 1 and 5000.
  4. The program also should ask for the number of items purchased.
  5. You can assume that all data entered will be of the correct type.
  6. The tax rate should be 7.5% and the cost of each poster is $14.95. These should be constants throughout the program.
  7. Dollar amounts should be displayed in correct format with dollar signs and two places after the decimal point.
  8. Your screen should look similar to the Sample Program Run on the back of this page. Requirements:  Name your program CDStore.java.  Submit just the CDStore.java file using Web Submit under project 2. Be sure that you submit your program to section 7.  Turn in a printout of the final version of your source code that exactly matches file you submitted.  The program must follow the coding guidelines handed out in class.  The program should be well commented Planning On Friday, September 17, you must turn in a plan for your program: a list of the tasks that the program must accomplish, in order, written in English. It does not have to be in complete sentences, but it does have to be legible, and it does have to make sense. Note that lists are not paragraphs.

Sample Program Run (user input in bold): Welcome to the Corner CD Collection. Please enter the customer’s first name: Marcia Please enter the customer’s last name: Brady Please enter the number of CD’s purchased: 4 Please enter the customer’s first name: Clark Please enter the customer’s last name: Kent Please enter the number of CD’s purchased: 3 Please enter the customer’s first name: Douglas Please enter the customer’s last name: Adams Please enter the number of CD’s purchased: 1 CORNER CD COLLECTION SALES REPORT Cust Num Name Num Items Subtotal Tax Total


MB304 MARCIA BRADY 4 $59.80 $4.49 $64. CK4120 CLARK KENT 3 $44.85 $3.36 $48. DA1432 DOUGLAS ADAMS 1 $14.95 $1.12 $16. Total sales: $119. Total taxes: $8. Grand total: $128.

Grading Standards

A perfect program will: Run correctly, meeting all specifications from the assignment Be correctly formatted with clear indentation Be well commented, following the coding guidelines for this class Be submitted correctly, both electronically and on paper (in a pocket folder, with grade sheet and all required materials, etc.) An ‘A’ program: Will run correctly, meeting all specifications from the assignment Will follow good programming practices (for example, using constants) May have no more than two minor errors in commenting, format, and/or submission A ‘B’ program: Will run correctly on the example data Will follow good programming practices May have minor errors in execution on alternate data or more than 2 minor errors in commenting, format, and/or submission or a single major error A ‘C’ program: Will compile and run May have multiple minor errors or errors in multiple areas or up to 2 major errors A ‘D’ program Will compile and run Has serious errors in execution An ‘F’ program Does not compile or does not run or substantially fails to follow the assignment guidelines or has a number of errors of different kinds