Question
Complete beginner to Java. How would I code the following class to calculate an order total. User should be asked to enter the following information:
Complete beginner to Java. How would I code the following class to calculate an order total. User should be asked to enter the following information:
-Customer name
-Customer email address
-Number of items
The user should be able to select from only one of the following items (using a switch statement):
1-T-shirt
2-Sweatshirt
3-Coffee Mug
The prices are: T-shirt-14.50
Sweatshirt- 24.95
Coffee mug- 8.25
The order should be calculated by taking the number of items times the price of each item, only one item can be selected. A 6.5% sales tac should be added on the order total/ After user has entered the information the program should display back the customer's name and order total.
Again, I'm a beginner so so please leave good comments with explanations. Thank you
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