Question: write it in python program and as .py file 7. Cash Register This exercise assumes that you have created the Retailitem class for Programming Exercise

 write it in python program and as .py file 7. Cash

Register This exercise assumes that you have created the Retailitem class for

write it in python program and as .py file

7. Cash Register This exercise assumes that you have created the Retailitem class for Programming Exercise 5. Create a cashRegister class that can be used with the RetailItem class. The cashRegister class should be able to internally keep a list of Retailitem objects. The class should have the following methods: . A method named purchase item that accepts a RetailItem object as an argument. Each time the purchase_item method is called, the RetailItem object that is passed as an argument should be added to the list tored in the cashRegister object's internal list. in the CashRegister object's internal list. . A method named get_total that returns the total price of all the Retailitem objects . A method named show items that displays data about the Retailitem objects stored . A method named clear that should clear the cashRegister object's internal list. Demonstrate the cashRegister class in a program that allows the user to select several items for purchase. When the user is ready to check out, the program should display a list of all the items he or she has selected for purchase, as well as the total price. 7. Cash Register This exercise assumes that you have created the Retailitem class for Programming Exercise 5. Create a cashRegister class that can be used with the RetailItem class. The cashRegister class should be able to internally keep a list of Retailitem objects. The class should have the following methods: . A method named purchase item that accepts a RetailItem object as an argument. Each time the purchase_item method is called, the RetailItem object that is passed as an argument should be added to the list tored in the cashRegister object's internal list. in the CashRegister object's internal list. . A method named get_total that returns the total price of all the Retailitem objects . A method named show items that displays data about the Retailitem objects stored . A method named clear that should clear the cashRegister object's internal list. Demonstrate the cashRegister class in a program that allows the user to select several items for purchase. When the user is ready to check out, the program should display a list of all the items he or she has selected for purchase, as well as the total price

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!