voldyy
Coder
Hello can someone help with this please
Write a receipt class.
Class to contain as data members
• The name of the store
• Array of prices of purchased goods, and member functions:
• Constructors
• get () and set () - for prices to work with individual elements of the array
• show () - displays a list of prices, the goods to be named product # 1, product # 2, etc.
• total () - determines the total price of the goods
• remove () - removes a product from the list (according to its index)
• discount () - reduces the price of goods by a certain percentage (the index of the goods in the array and the percentage are submitted as parameters)
• other member functions if desired
In the main function, illustrate how to work with the methods of the receipt class.
Write a receipt class.
Class to contain as data members
• The name of the store
• Array of prices of purchased goods, and member functions:
• Constructors
• get () and set () - for prices to work with individual elements of the array
• show () - displays a list of prices, the goods to be named product # 1, product # 2, etc.
• total () - determines the total price of the goods
• remove () - removes a product from the list (according to its index)
• discount () - reduces the price of goods by a certain percentage (the index of the goods in the array and the percentage are submitted as parameters)
• other member functions if desired
In the main function, illustrate how to work with the methods of the receipt class.