Question: You are to create a program that will keep track of 4 online purchases you will make from the Steeler official online site. (You are

You are to create a program that will keep track of 4 online purchases you will make from the Steeler official online site. (You are to make up the data and you will read the data from the keyboard, not a file) For each of the four purchases, the data you will read will be

  1. Item number of the item purchased(integer)
  2. Name of the item purchased (string)
  3. Price of the item purchased(double)
  4. Quantity of the item purchased (integer)

  1. You must also read the name and address of the customer where the order is to be shipped

Your program must meet the following specifications

You must create a new user defined class

  • Add data is to be a member of the class. (NOTE: parallel arrays is a good way to define the item data) NO data is to be passed between methods in this program
  • All of the following methods are to be part of the class
  • One method to read in all data, using individual dialog boxes for each piece of data. (We will using dialog boxes for multiple input later)
  • One method to calculate the following
    1. Amount for each item purchased (price times the quantity)
    2. Total before tax (addition of each in step 1.)
    3. Tax (7% times step 2. )
    4. Final amount due (step 2. Plus step 3.)
  • One method using one dialog box to print the invoice:

Print Steeler Official Fan Shop

  • Name and address of the customer
  • All item information: for each of the 4 items, print the item number, item name, item price, item quantity and amount for that item
  • Total before tax
  • Tax
  • Final amount due

Additionally, you must use formatting for all decimal values (there is a sample program stored with this assignment that shows how to format your decimals)

If you like, you may also align your data in columns (a sample program to do that is also stored with this assignment)

Java Programming

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!