[Solved]Python Program First Create Class Named Retailitem Holds Data Item Retail Store Class Stor Q37065126
python program
First, create a class named RetailItem that holds data about anitem in a retail store. The class should store the following datain attributes: item description, the number of units in inventory,and price. These should be set in the constructor and need to beprivate.
Since there are private members, be sure to write setters andgetters for each attribute. Also be sure to overload the str methodfor this class. Save this class as a separate py module file. Thereshould be no other classes in this file.
Next, create a CashRegister class that will use the RetailItemclass. The CashRegister class should be able to internally keep alist of RetailItem objects. This internal list must beprivate.
The CashRegister class must have the following methods:
– purchase_item that accepts a RetailItem as an argument. Each timethe purchase_item method is called, the RetailItem argument isadded to the list of purchases.
– get_total returns the total price of ALL of the RetailItemobjects stored in the CashRegister’s list of items
– show_items that displays data about each RetailItem in theCashRegister’s list of items.
– clear method should empty the list of items
– save_cart method will save all of the RetailItems in theCashRegister’s list to a file. The last line of the file shouldhave the output of get_total and show_items.
Save this class as a separate py module file. There should be noother classes in this file.
Last, write a good driver program to demonstrate ALL of thefeatures of your classes. This driver program must be a separate pyfile, and it MUST correctly import your RetailItem and CashRegistermodules.
Expert Answer
Answer to python program First, create a class named RetailItem that holds data about an item in a retail store. The class should … . . .
OR

