the booking system is
the booking system is useful
import javax.swing.JOptionPane; public class MovieTicket { { String movieName; String inputStr; String outputStr; double adultTicketPrice; double childTicketPrice; int noOfAdultTicketsSold; int noOfChildTicketsSold; double percentDonation; double amountDonated; double netSaleAmount; double grossAmount; ("Enter the price of an adult ticket: "); ("Enter the price of an child ticket: "); ("Enter the number of an adult ticket sold : "); ("Enter the number of an child ticket sold : "); ("Enter the percentage of the donation : "); grossAmount = adultTicketPrice * noOfAdultTicketsSold + childTicketPrice * noOfChildTicketsSold; amountDonated = grossAmount * percentDonation / 100; netSaleAmount = grossAmount - amountDonated; outputStr = " Movie Name: " + movieName + "\n" + "Number of Ticket Sold: " + (noOfAdultTicketsSold + noOfChildTicketsSold) + "\n" + " Gross Amount: $" + " Percentage of the Gross Amount Donated: " + "Amount Donated: $" + "Net Sale: $" "Theater Sales Data", } }
grossAmount = adultTicketPrice * noOfAdultTicketsSold + childTicketPrice * noOfChildTicketsSold
8. Calculate the amount donated to charity using the formula:
= grossAmount * percentDonation / 100;
9. Calculate the net sale amount:
netSaleAmount = grossAmount - amountDonated;