Write a Python class definition called GroupSales to represent a ticket sales transaction for a group of people.The transaction should contain the following information:
customer name (default value is the empty string)
number of adults (default value is 0)
number of children (default value is 0)
Answers
Answered by
1
Answer:
Include the following methods: • a constructor which given a customer name, the number of adults, and the number children, creates a GroupSales object (be sure to account for the default values). • an accessor method for the customer name • a mutator method for the customer name a method that computes and returns the total amount of the transaction calculated as follows: o each adult ticket costs $55 o each child ticket costs $10 up to the number of adult tickets (i.e., the number of $10 tickets cannot exceed the number of $55 tickets) o each child ticket beyond the number of adult tickets costs $50 • 15% tax is added
Similar questions