0 комментариев

Write a program that uses classes, polymorphism and duck-typing in Python 3. You need to develop classes for a system that manages a coffee-shop.

Below is a description of their operations. You need to understand it and develop a class structure, which includes inheritance and objects of one class inside objects of another. Description:

They make to types of beverages – coffee and tea. Coffee can be made in a classic Italian way (espresso) of using alternative methods (pour-over, Cemex, etc.).

Prices of different types of beverages are calculated differently. Let’s say a beverage costs X. If it’s a classic Italian coffee, a customer will pay X, if it’s a tea, he will pay X+100 tenge for service, as they bring a teapot to your table, and if it’s a coffee made with alternative method, he will pay X*1.1, as it takes more time and effort to prepare.

Classic coffee can also come with syrups, and tea can come with additional spices/herbs. Different syrups and herbs can cost differently.

Your task is to create classes for a program, which would allow to:

1) Create a menu of beverages with prices (for example black tea for 300 tenge, latte for 400 tenge, latte with caramel syrup for 500 tenge, etc.)

2) Allow to add syrups and spices/herbs to your coffee/tea. For example, latte costs 400 tenge, but customer can add Irish cream for 200 extra tenge.

3) Allow to perform accounting and track money

You can get bonus points for:

1) Creating a console interface to create menu and track orders (for example you create a menu, than user comes and you choose that he wants Earl Grey (350 tenge) tea with additional ginger 150 tenge – total 500 tenge goes to our cashbox (up to +3 points)

2) Creating some types of reports – how many teas and coffees were sold, how many of each type (latte/cappuccino/americano/etc.), how many of each additional syrups/spices were used. (up to +5 points)

3) Add some other types of information you can track (for example how many of each syrup you have in stock and to track if you ran out of certain syrups (up to +4 points)

4) Any other additional functions/features you can think of (+X points)

5) Plagiarism (-15 points)

Решенный вопрос
Добавить комментарий