JAVA; Write the pseudocode for a program that will calculate the cost of a ticke
ID: 3599258 • Letter: J
Question
JAVA; Write the pseudocode for a program that will calculate the cost of a ticket order for a Downtown Stadium and display the receipt for the customer on the screen. There are 2 ticket prices: adult, and senior citizen. Adult seats are $4.50 and senior citizen seats are $3.50. If more than 5 tickets are purchased, the customer gets an extra 20% off the of the ticket order. If more than 10 regular seats are purchased, the customer gets an additional 10% off the cost of the order. A customer can only place an order for one type of ticket. Output the type of ticket purchased, the number of tickets purchased, the gross cost, the amount of the discount, and the final cost of the order.
Explanation / Answer
Dear Student,
below i have written the pseudocode.
------------------------------------------------------------------------------------------------------------------------------------------
>Select the type of ticket by entering char value either a(adult) or sc(snior citizen).
>if choice is a.
>get the total ticket to be purchase.
>calculate total price by multiplying ticket price with cost of adult ticket.
if purchased ticket are greater than 5 the calculate 20% discount on total cost.
else if ticket purchased are greater than 10 then calculate 10% discount on total cost.
calculate gross cost by substracting discount from total cost.
display total ticket purchased, the gross cost, the discount amount, and the total cost of the order.
>if choice is senior citizen.
>get the total ticket to be purchase.
>calculate total price by multiplying ticket price with cost of senior citizen ticket.
>if purchased ticket are greater than 5 the calculate 20% discount on total cost.
>else if ticket purchased are greater than 10 then calculate 10% discount on total cost.
>calculate gross cost by substracting discount from total cost.
>display total ticket purchased, the gross cost, the discount amount, and the total cost of the order.
----------------------------------------------------------------------------------------------------------------------------------------
Kindly Check and Verify Thanks...!!!
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.