Computer Science Assignment | Custom Assignment Help

Write a class named Retail Item that holds data about an item in a retail store. The class should store the following data in attributes: item description, units in inventory, and price. Make sure you write appropriate accessor and mutator methods as well as the __str__ method needed to print out the information about the stores retail inventory. Once you have written the class, write a program that creates three Retail Item objects and stores the following data in them:

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Custom Assignment Help

The output of your test program will look something like this:

Retail Item 1:

Description: Jacket

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Units in inventory: 12

Price: $59.95

Retail Item 2:

Description: Designer Jeans

Units in inventory: 40

Price: $34.95

Retail Item 3:

Description: Shirt

Units in inventory: 20

Price: $24.95

OO Assignment – Part 2

This assignment assumes that you have finished OO Assignment – Part 1.

Create a CashRegister class that can be used with the RetailItem class you previously created. The CashRegister class should be able to 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. Make sure you print out a message to the user to let them know that an item was added to the list.
  • A method named get_total that returns the total price of all the RetailItem objects stored in the CashRegister object’s list. This method will loop through the list to produce the total which is then returned.Custom Assignment Help

Next, write a program that tests your CashRegister class. I would suggest that your program does the following:

1) Create all the items for sale.

2) Create a cash register object.

3) Create a function called get_user_choice that displays a menu that allows the user to choose what item they want to purchase.

4) Allow the user to . To do this, you will need a loop that will continue to display the menu (by calling the get_user_choice function you created) until they are ready to check out. Make sure that you check your inventory levels. If the inventory quantity of the item the user selected is 0 (zero), then you should display a message to the user that ‘The item is out of stock.‘.

5) When the user is ready to check out, the program should display the total price of the items selected for purchase.


Get Computer Science homework help today.

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with Homework Writing Services
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Michelle is a great writer! Assignment on time.
Customer 463427, October 1st, 2022
good job
Customer 456821, September 1st, 2022
Computer science
Even though I received the paper on time, the person that I received the paper from kept telling that did submit the paper to me and there no link available to me to download and revise the paper until excessive close to the deadline. This is not good business, considering that there at least a week to write not to mention the support kept telling me that I was submitted when it wasnt...
Customer 452515, April 9th, 2020
English 101
She did an excellent job on my revision
Customer 464103, April 24th, 2023
Religious studies
Thank you this was supper
Customer 452763, March 17th, 2020
Healthcare & Medical
Instructions followed quite well.
Customer 452441, April 13th, 2022
I'm very pleased with what I received. Thank you for following instructions and for going an extra mile and delivering well researched and well-written content. Thank you.
Customer 463869, April 12th, 2023
As I expected.
Customer 460551, November 23rd, 2021
Good job!
Customer 463869, May 11th, 2023
The writer did a really good job on the research.
Customer 463869, April 14th, 2023
Good job
Customer 463647, February 28th, 2023
Customer 463813, March 8th, 2023
Customer reviews in total
Current satisfaction rate
3 pages
Average paper length
Customers referred by a friend
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat