Question: Please code in Java. If you can do the extra credit it would be appreciated. Online purchasing Fantasy Entertainment is accepting online orders for your

Please code in Java. If you can do the extra credit it would be appreciated.

Online purchasing

Fantasy Entertainment is accepting online orders for your party. They have developed a program that allows the user to select the options to purchase from a menu of items. Write a program that allows the user (customer) to select the services to purchase, calculates the price of the services ordered, and displays a receipt of this information to the customer (assume the sales tax rate is 6.5%).

Your program should prompt the user (customer) to enter the following information:

Customer name

Service purchased

The program then outputs the following information:

Customers name

Total number of services ordered

Price of menu services (per hour) before sales tax

Sales tax

Total amount due

Amount saved

1. Face Painting .... ..$50 2. Balloon Twisting ....$45 3. Puppet Shows ........$55 4. Stilt Walkers .......$60 5. Bounce House ........$80 6. Rock Wall ...........$70 7. Petting Zoo .........$65 10.Exit ************************************************************* * PROMOTION 1 * * if you select Face Painting and Balloons -> $10 OFF * *************************************************************

************************************************************* * PROMOTION 2 * * if you select all options -> $80 OFF * *************************************************************

Note: When placing their order, the user will enter the number of the item, NOT the name of the item. For example, if the user wants to order Face Painting, he/she would type 1 (not Face Painting) to order Face Painting. Please refer to the Sample Output file for full details of what the program should look like when it runs.

1

This assignment MUST be created individually. You must turn in your OWN source code and Java bytecode executable file. You MAY NOT share files!

Instructions

Compile and execute your program to ensure that it works correctly.

Be sure to run your final program using the sample data included in the Sample Output

file to ensure your program works properly.

Make sure your output labels match those in the Sample Output file exactly.

Notes

You MUST store any calculations in variables (i.e. do not calculate the price of menu items, sales tax, or total amount due directly in your System.out.println statements)

You do NOT need to worry about formatting the decimal places on values you calculate

You may perform the tasks in any order as long as your output follows the order of the

output in the example scenarios contained in the Sample Output file

Extra credit (10 points)

Use an Input Dialog box to allow the user to enter the hours of each services ordered:

Title: Number of hours

Message: How many hours would you like?

The Input Dialog box should appear after the user enters the number of the menu item. Be sure to incorporate the quantity (number of hours) ordered when calculating the total hours services ordered and total price of the services.

Please refer to the Sample Output BONUS file for scenarios that incorporate the Input Dialog Box.

To receive full credit:

Submit the following files in a single zip file to Canvas

o File with your Java source code (.java file) o File with your Java bytecode executable file (.class file) o Refer to the instructions for creating the zip file on Canvas if you do not create

the file with the correct folders and structure, you will lose points

Modules NetBeans Information -> NetBeans-> where are my files for my homework?.

You must follow the appropriate Coding Standards listed in the Coding Standards

document under Modules on Canvas. o 40% of your grade on the source code will be based on how well you follow these

standards and how well you comment your source code

Sample output :

SAMPLE PROGRAM OUTPUT

Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output.

Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by the user when the program runs (and therefore can change each time the program runs).

Scenario 1: Customer purchases all 7 services and obtains discount of $80

 Welcome to Fantasy Entertainment 

Please enter your name: Lisa Miller

Menu 1. Face Painting .... ..$50 2. Balloon Twisting ....$45 3. Puppet Shows ........$55 4. Stilt Walkers .......$60 5. Bounce House ........$80 6. Rock Wall ...........$70 7. Petting Zoo .........$65 10.Exit ************************************************************* * PROMOTION 1 * * if you select Face Painting and Balloons -> $10 OFF * *************************************************************

************************************************************* * PROMOTION 2 * * if you select all options -> $80 OFF * ************************************************************* Please select your options: 1

Enter another option: 2Enter another option: 3Enter another option: 5Enter another option: 7Enter another option: 4Enter another option: 6Enter another option: 10

Thank you for ordering with Fantasy Entertainment, Lisa Miller Total services ordered: 7 Price for the services: $345.0 <Discount already applied> Sales tax: $22.425

Total amount due: $367.425 You saved: $80.0 

1

Scenario 2: Customer purchases 2 services, obtains discount of $10Welcome to Fantasy Entertainment

Please enter your name: John Smith

Menu 1. Face Painting .... ..$50 2. Balloon Twisting ....$45 3. Puppet Shows ........$55 4. Stilt Walkers .......$60 5. Bounce House ........$80 6. Rock Wall ...........$70 7. Petting Zoo .........$65 10.Exit ************************************************************* * PROMOTION 1 * * if you select Face Painting and Balloons -> $10 OFF * *************************************************************

************************************************************* * PROMOTION 2 * * if you select all options -> $80 OFF * ************************************************************* Please select your options: 2

Enter another option: 1Enter another option: 10

Thank you for ordering with Fantasy Entertainment, John Smith Total services ordered: 2 Price for the services: $85.0 <Discount already applied> Sales tax: $5.525

Total amount due: $90.525 You saved: $10.0 

See next page for Scenario 3

2

Scenario 3: Customer purchases 1 service:

Welcome to Fantasy Entertainment Please enter your name: David

Menu 1. Face Painting .... ..$50 2. Balloon Twisting ....$45 3. Puppet Shows ........$55 4. Stilt Walkers .......$60 5. Bounce House ........$80 6. Rock Wall ...........$70 7. Petting Zoo .........$65 10.Exit ************************************************************* * PROMOTION 1 * * if you select Face Painting and Balloons -> $10 OFF * *************************************************************

************************************************************* * PROMOTION 2 * * if you select all options -> $80 OFF * ************************************************************* Please select your options: 5

Enter another option: 10

Thank you for ordering with Fantasy Entertainment, David Total services ordered: 1 Price for the services: $80.0 Sales tax: $5.2

Total amount due: $85.2 You saved: $0.0 

3

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!