OOP exercise. Simple commerce system
Very basic OOP exercise. Creating Product class, that will be the base for further inheritance, and which can not be instantiated. This class is inherited by two classes that represent specific groups of products: Chocolate and Wine. Each product has certain properties. Also, each product also has a method for calculating the price, which is calculated by increasing the basic price by the amount of the tax. Tax (VAT) for each product is 20% and this is a data that is constant and will not change. However, products from the wine group have an additional tax as they belong to the group alcoholic beverages and it amounts to 10% of the price already increased for the amount of VAT. And this is it data that is constant and will not change. Because of this, it is necessary to redefine the method for calculating the price only in the Wine class. In addition, the Wine class should have an attribute that defines volume of the bottles, and the class Chocolate attribute that defin...