Create an austract class Seasonal_Ticket that contains an abstract method calculate_concession that returns the concession for the given number of tickets. The method contains two parameters, such as...

Java oopsCreate an austract class Seasonal_Ticket<br>that contains an abstract method<br>calculate_concession that returns the<br>concession for the given number of tickets.<br>The method contains two parameters, such<br>as total_tickets and ticket_price.<br>Define a subclass Group_Concession from<br>Seasonal_Ticket. It contains a constructor<br>with two parameters such as min_no_tickets<br>and concession_percent. It defines the<br>method calculate_concession so that if the<br>total_tickets is more than min_no_tickets, the<br>concession is concession_percent percent.<br>Derive a class Child_Ticket_Concession<br>from Seasonal_Ticket. The class contains a<br>constructor with a parameter n that denotes<br>the age of children. In addition, the class<br>defines the method calculate_concession so<br>that if the age is less than 10, the<br>concession is 50% in the ticket price.<br>Otherwise, concession 40% in the ticket<br>price.<br>Define a driver class Trip. Get the input from<br>the user. Calculate the total_ticket_amount to<br>be paid for the trip. Display the output.<br>Write sample input and output.<br>

Extracted text: Create an austract class Seasonal_Ticket that contains an abstract method calculate_concession that returns the concession for the given number of tickets. The method contains two parameters, such as total_tickets and ticket_price. Define a subclass Group_Concession from Seasonal_Ticket. It contains a constructor with two parameters such as min_no_tickets and concession_percent. It defines the method calculate_concession so that if the total_tickets is more than min_no_tickets, the concession is concession_percent percent. Derive a class Child_Ticket_Concession from Seasonal_Ticket. The class contains a constructor with a parameter n that denotes the age of children. In addition, the class defines the method calculate_concession so that if the age is less than 10, the concession is 50% in the ticket price. Otherwise, concession 40% in the ticket price. Define a driver class Trip. Get the input from the user. Calculate the total_ticket_amount to be paid for the trip. Display the output. Write sample input and output.

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here