Computer Science, asked by jenasoumyarani5656, 7 months ago

Define a class Ticket having the following description:
Data Members/Instance Variables:
String name - Customer's Name
int n - Number of tickets to be booked.
int tp
Price of a single ticket.
double amt-Total ticket amount after availing the discount.
Member Functions:
(6) Ticket() - Parameterized constructor to accept name, number of tickets, and ticket price.
void calculate() - to calculate the final amount to be paid after availing the discount.
Number of Tickets Discount % on Total Price
Upto 2 tickets
10%
>2 and upto 5
15%
>5 and upto 10 20%
>10
25%
(iii) void printTicket () - Display name, n, and total amount to be paid in different lines.
Create a main () method to create an object and call the above functions.​

Answers

Answered by paplukinggames
0

Answer:

Here you go....

Explanation:

Read the book carefully

Similar questions