Securing Higher Grades Costing Your Pocket? Book Your Coursework Help at The Lowest Price Now!

  • +1-617-874-1011 (US)
  • +44-117-230-1145 (UK)
Online Customer Service

Ticket Tasks

Task 1:

Prompt the user for the number of adult tickets, a number of children tickets, and a number of senior tickets that have been sold during the Event. These numbers should be non-negative.

Task 2:

Display the number of tickets of each type and calculate and display the revenue from selling tickets for the event if each adult ticket costs $20.00, each child ticket costs 50% of the adult ticket and a senior ticket costs 75% of the adult ticket. The output must be given in currency format.

Task 3:

Display a statement that shows a statistic of visitors attending

  • If the number of adult tickets is smaller than or equal to the total of children's and senior tickets, the program should display “The event is becoming a festival for everyone!”
  • If the number of children's tickets is greater than or equal to senior tickets, the program should display “The event is attracting more and more young people!”
  • In other cases, the program should display “The event should have more space for kids!”

Task 4:

The program prompts the user for the number of participants in this year’s event; the value entered must be between 0 and 40 (inclusive). The program continues to prompt the user until a valid value is entered.

Task5:

After the user enters the number of participants, the program prompts the user for the names and event codes for each participant that indicates the type of event, S for Swimming, B for Badminton, and F for football. Along with the prompt for an event code, display a list of valid categories. Whenever a code is invalid, re-prompt the user for a valid code continuously. Display the count of the number of participants for each event.

Hint:

To write code for Task 5without using an array, we ignore storing the names for participants and use different variables to store the count of each event only. A possible screenshot when running the application is given below.

Ticket Tasks
Want answer for this Assignment
Tap to Chat
Get Instant Assignment Help
Tap to Chat
Get Instant Assignment Help