Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

=+ What are the new equilibrium interest rate and level of income?

Answered: 1 week ago