[Solved] CSCI 1015 Assignment 5

$25

File Name: CSCI_1015_Assignment_5.zip
File Size: 207.24 KB

SKU: [Solved] CSCI 1015 Assignment 5 Category: Tag:
5/5 - (1 vote)

CSCI 1015 Assignment 5A movie company has two theaters (Theater 1, Theater 2) to show movies at one time. The cost of viewing a movie is as follows.TheaterAdultChild19.506.00212.507.50Write a Java program that prompts for each of the following in the order given.1. Theater Number2. Number of Adult Tickets3. Number of Child TicketsThe program should then print the total amount needed for the tickets requested.The program must run in a loop using the sentinel -999. When the loop terminates, display the number of tickets for each theater for both child and adult that are sold and display a total amount collected for that day. Display all dollar amounts to two decimal places. Make your output attractive and include appropriate comments in your program.Sample input and output (red indicates the user input)Enter theater number: 1 Adult Tickets: 10 Child Tickets: 5Enter theater number: 2 Adult Tickets: 15 Child Tickets: 10Enter theater number: 2 Adult Tickets: 6 Child Tickets: 4Enter theater number: 1 Adult Tickets: 8 Child Tickets: 4Enter theater number: -999// Input complete, the following will display the receipt information:Theater 1:Adult Tickets: 18Child Tickets: 9Amount (total): $225.00Theater 2:Adult Tickets: 21Child Tickets: 14Amount (total): $283.5Total Amount: $508.5

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI 1015 Assignment 5
$25