Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finish out the following program in Java language If you have any trouble with the examples let me know! To simplify the program, we will

Finish out the following program in Java language If you have any trouble with the examples let me know!

image text in transcribedimage text in transcribed

To simplify the program, we will use the following pricing for tickets, along with a required donation. Required Donation not per ticket Seat Location Price 1) View Level 2) Premium View Level 3) Premium Bench 4) Club Level $150 $272 S323 S455 $200 $500 $1,300 Create a file called Proj3.java then develop a java application that meets the following specifications 1. Program will display a menu (as shown below) and instruct the user to enter the category they fall in. If the user makes an invalid numeric selectio (not 1-5), display the error message "*Invalid Selection. Please enter a number 1-5 only" and have the user re-enter the selection. Repeat until a valid choice is entered 2. Once category is validated, have the user enter the seat location they want to purchase for the season. If the user makes an invalid numeric selection (not 1-4), display the error message "**Invalid Selection. Please enter a number 1-4 only" and have the user re-enter the selection. Repeat until a valid choice is entered Also, students are NOT allowed to purchase Club Level Seats (Category 4). Display an error message if a student attempts to purchase Club Level and have them re-enter a seat choice until valid 3. Once the user has entered a valid seat location, ask how many tickets they would like and then ask if they would like to purchase a parking pass (Y or 'N'). Accept upper or lower case. (Assume these entries are valid no other error checking required) 4. Ticket Price Discounts are offered as follows: Alumni get a 5% discount, Faculty & Staff a 10% discount, Military a 20% discount, and students get tickets for half-price. This discount applies to the ticket price only, not any other fees including the required donation. Also, students are NOT required to make a donation to purchase seat choices 1-3 (again, not allowed to purchase seat option 4) 5. Calculate and display the total number of tickets requested and the total cost for all tickets, including the required donation. If parking is requested, add $100 for parking (no discounts on parking) Sales tax of 6.6% of the entire TICKET order, after discounts(parking and the donation is not taxed). is charged. A processing fee of S2 per ticket is also charged. The processing fee is waived for students and military 6 7. Once the order has been processed, ask the user if they wish to order any more tickets ('Y" or 'N') Accept upper or lower case. Again, assume a valid entry. If they answer 'Y" then run the application again. If 'N' exit the program. (This will be a new ticket order, so don't track any previous purchases.) Here is a sample run of the program: (continued on next page) Please select from the following categories 1) Student 2) Alumni 3) Faculty or Staff 4) Military 5) General Public Selection: 22 Invalid Selection. Please enter a number 1-5 onl Selection: 2 Please select from the following seat locations: View Level 2) Premium View Level 3) Premium Bench 4) Club Level (non-students only Selection: 22 *Invalid Selection. Please enter a number 1-4 only Selection: 22 Invalid Selection. Please enter a number 1-4 only Selection: 2 How many tickets would you like to purchase? 2 Would you like to purchase a parking pass for an additional $100? (Y or 'N):Y ordered 2 Premium View Level seats WITH parking Tickets: $544.00 Discount: $27.20 Processing Fee: $4.00 Subtotal: $520,80 Sales Tax: $34.11 Required Donation: $200.00 Parking $100.00 Total: $855.17 Would you like to order more tickets? (Yor N): Y (... redisplay menu and start over) Here is the output Student) You ordered 4 View Level seats WITHOUT parking Tickets: $600.00 Discount: $300.00 Processing Fee: S0 00 (fzero. OK lf you omit this) Subtotal: $300,00 Sales Tax: $19,80 Required Donation: SO.00 ifzero, OK if you omit this) Parking $0.00 Total: $319.80 for a couple of other scenarios (Military You ordered 1 Club Level seat WITH parking Tickets: $455.00 Discount: $91.00 Processing Fee $0.00 (fzero. OK fyou omit this) Subtotal: $364.00 Sales Tax: $24.02 Required Donation: S1,300.00 Parking $100.00 Total: $1.788.02 fzero, OK if you omit this) Requirements: 1. To simplify grading, the output must look EXACTLY like the examples below (of course, different results if the user inputs different responses). This includes spacing, capitalization, speling, etc. All 2. At a minimum, use constants for the price of each category of tickets, the parking price, discount percentage for each category, the sales tax percentage and the processing fee. This would allow for easy modification if any of these values need to be modified in future versions of the application. 3. Thoroughly test with different categories, seat choices, number of tickets, and with/without parking. May want to develop a testing plan as part of your pre-coding planning phase

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_2

Step: 3

blur-text-image_3

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

Databases Theory And Applications 27th Australasian Database Conference Adc 20 Sydney Nsw September 28 29 20 Proceedings Lncs 9877

Authors: Muhammad Aamir Cheema ,Wenjie Zhang ,Lijun Chang

1st Edition

3319469215, 978-3319469218

More Books

Students also viewed these Databases questions