Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Cash Register Assume that a local event coordinator asks you to write a Java application (CashRegister.java) to accept an event reservation with a payment option

Cash Register

Assume that a local event coordinator asks you to write a Java application (CashRegister.java) to accept an event reservation with a payment option as cash only. This application must allow a clerk to enter the required information and display output for the reservation details. It must also enable the clerk to enter an amount of cash received and display a change amount.

Required Information

a. Customer's name, which includes both first name and last name

b. Date of reservation

c. Number of tickets purchased

d. Cash Received (After balance due is shown) The cost per one ticket is $25.50. The total price of the ticket purchased must include a sales tax of 7%. After a clerk enters all information, the program will calculate a balance due for the customer. Then it must allow the clerk to enter an amount of cash received from the customer, which will calculate the change amount returned to the customer.

Sample Runs Note:

Your application must prompt the inputs and display the outputs precisely, as shown below in the sample runs.

image text in transcribed

>run Cash Register Event Ticket Reservation (Cash Only) Name of Customer: John Doe Date of Reservation: > run Cash Register Event Ticket Reservation (Cash Only) Name of Customer: Jane Smith 02/25/2016 Number of Ticket(s): 6 Reservation Details Name of Customer: John Doel Date of Reservation: 02/25/2016 Number of Ticket(s): 6 Date of Reservation: 02/25/2016 Number of Ticket(s): 2 Reservation Details Name of Customer: Jane Smith Date of Reservation: 02/25/2016 Number of Ticket(s): 2 Cost of Ticket(s) (25.50 x 6): $153.00 Cost of Ticket(s) (25.50 x 2): $51.00 Sales Tax: $10.71 Balance Due: $163.71 Cash Received: $ 200.00 Change Due: $36.29 Thank you for your reservation. Sales Tax: $3.57 Balance Due: $54.57 Cash Received: $ 60.00 Change Due: $5.43 Thank you for your reservation.

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

Students also viewed these Programming questions