Question: This week were going to demonstrate our knowledge of Python object oriented programming concepts by creating a simple cash register program. Your program must have

This week were going to demonstrate our knowledge of Python object oriented programming concepts by creating a simple cash register program.

Your program must have a header. Your program must have a welcome message for the user. Your program must have one class called CashRegister.

Your program will have an instance method called addItem which takes one parameter for price.

The method should also keep track of the number of items in your cart. Your program should have two getter methods. getTotal returns totalPrice getCount returns the itemCount of the cart Your program must create an instance of the CashRegister class.

Your program should have a loop which allows the user to continue to add items to the cart until they request to quit. Your program should print the total number of items in the cart.

Your program should print the total $ amount of the cart. The output should be formatted as currency. Be sure to investigate the locale class.

You will need to call locale.setlocale and locale.currency.

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!