Question: PLEASE USE PYTHON 3 TO SOLVE! THANKS! PLEASE USE PYTHON 3 TO SOLVE! THANKS! Example 3 Using Retailltem class from previous exercise, create another class

PLEASE USE PYTHON 3 TO SOLVE! THANKS!

PLEASE USE PYTHON 3 TO SOLVE! THANKS! PLEASE USE PYTHON 3 TO

PLEASE USE PYTHON 3 TO SOLVE! THANKS!

Example 3 Using Retailltem class from previous exercise, create another class named CashRegister that can be used with the Retailltem class. The CashRegister class should be able to internally keep a list of Retailltem objects. The CashRegister class should have the following methods: - purchase_item: That accepts a Retailltem object as an argument. Each time the purchase_item is called, the Retailltem object that is passed as an argument should be added to the list. get_total: Returns the total price of all the Retailltem objects stored in the CashRegister object's internal list. show_items: That displays data about the Retailltem objects stored in the CashRegister object's internal list. clear: That clear 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 for check out, the program should display a list of all the items he/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!