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
- Item number of the item purchased(integer)
- Name of the item purchased (string)
- Price of the item purchased(double)
- Quantity of the item purchased (integer)
- 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
- Amount for each item purchased (price times the quantity)
- Total before tax (addition of each in step 1.)
- Tax (7% times step 2. )
- 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)
Before trying to format your data, you should first make sure your program is calculating everything correctly. You do not have to do user input error checking on this assignment. We will get to that on a future assignment.
Please use dialog boxes and parallel arrays.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started