Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python object oriented programming concepts create a simple cash register program. Your program must have a header. Your program must have a welcome message

Using Python object oriented programming concepts create 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.

make sure you have a header describing your program and descriptions throughout the program describing the tasks in the program.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions

Question

What is Ramayana, who is its creator, why was Ramayana written?

Answered: 1 week ago

Question

To solve by the graphical methods 2x +3y = 9 9x - 8y = 10

Answered: 1 week ago