This program will calculate the discount given to customers at a pet store. There are three types of loyalty memberships: Gold members receive a 20% discount, Silver members receive a 15% discount, and Classic members receive a 10% discount, for all services. Customers who do not have a membership will not receive a discount. All members will receive a 10% discount on products purchased. There will be three classes in this program: customer, discount, and customervisit. It shall compute the total bill if the customer avails a number of services and purchases a number of products during a visit. Create a testdriver to test all the classes as well as complete/supply the code under getTotalCost to compute the final payment.
Comments
Leave a comment