web-development-exercise

Create a Movies class that determines the cost of a ticket to a cinema,

                   based on the moviegoer’s age. Assume that the cost of a full-price
                   ticket is $10. Assign the age to a private data member. Use a public
                   member function to determine the ticket price, based on the follow-
                   ing schedule:
                   Age            Price
                   Under 5        Free
                   5 to 17        Half price
                   18 to 55       Full price
                   Over 55        $2 off

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *