Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need Pythone code Please The Acme Retail Warehouses has 2 warehouses in the city. Warehouse 1 holds hardware material that are distributed to stores. Warehouse

Need Pythone code Please

The Acme Retail Warehouses has 2 warehouses in the city. Warehouse 1 holds hardware material that

are distributed to stores. Warehouse 2 holds grocery items that are distributed to grocery stores.

You need to create 2 classes. The first class is the warehouse. It has attributes Location (street address

you give it), type of storage (hardware or grocery), and a list of inventory items (objects of the second

class discussed below). The class should contain accessors and mutators as well as an __str__.

The second class is inventory. It has attributes ID, Description, Quantity, Cost. The class should contain

accessors, mutators, an __str__, and a method to calculate and return the retail price. All items have a

20% markup.

You need to write 2 programs. Program 1 reads data from 2 files. hardware.txt contains hardware

items that are stored in Warehouse 1. The data are comma delimited and contain the following fields:

ID number, Description, Quantity, Cost. grocery.txt contains grocery items that are stored in Warehouse

2. The data are comma delimited and contain the following fields: ID number, Description, Quantity,

Cost. For each file, create a warehouse object. You supply the location and type of storage for each

object. Use the data from the files to create the inventory object list. Both files should be saved using

the Pickle module.

Program 2 is a menu driven program. The user should be asked which warehouse they will be working

with and then a menu should be displayed with the following choices:

1. Add Item allows the user to add an item to the inventory (you supply the data)

2. Delete Item allows the user to delete an item from the inventory (returns the information)

3. Change quantity allows the user to add or subtract from the inventory

4. Change price allows the user to change the price of an item in the inventory

5. Print item the user would enter an ID and the program will display the inventory

information for that ID

6. Quit

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

8. Compare fle.'Cibilityo f thinking \\1th flu

Answered: 1 week ago