Microsoft Word - CIS2348_FinalProject_Part2.docx CIS 2348, Spring 2021 XXXXXXXXXXFinal Project Part2 You will design a program that manages the inventory of an electronics store. You will need to use...

1 answer below »
I previously submitted the first part of the assignment and received the code that I attached. For the second part of the project, I'll need the required output mentioned in the pdf. I will also need a description of the structure of the code so that I could give an explanation for my presentation.


Microsoft Word - CIS2348_FinalProject_Part2.docx CIS 2348, Spring 2021 Final Project Part2 You will design a program that manages the inventory of an electronics store. You will need to use a number of concepts that you learned in class including: use of classes, use of dictionaries and input and output of comma delimeted csv files. Input: a) ManufacturerList.csv -- contains items listed by row. Each row contains item ID, manufacturer name, item type, and optionally a damaged indicator b) PriceList.csv -- contains items listed by row. Each row contains item ID and the item price. c) ServiceDatesList.csv – contains items listed by row. Each row contains item ID and service date. Example ManufacturerList.csv, PriceList.csv and ServiceDatesList.csv are provided for reference. Your code will be expected to work with any group input files of the appropriate format. Manufacturers can and will likely be different as will the items. You can reuse parts of your code from Part 1. Required Output: 1) Interactive Inventory Query Capability a. Query the user of an item by asking for manufacturer and item type with a single query. i. Print a message(“No such item in inventory”) if either the manufacturer or the item type are not in the inventory, more that one of either type is submitted or the combination is not in the inventory. Ignore any other words, so “nice Apple computer” is treated the same as “Apple computer”. ii. Print “Your item is:” with the item ID, manufacturer name, item type and price on one line. Do not provide items that are past their service date or damaged. If there is more than one item, provide the most expensive item. iii. Also print “You may, also, consider:” and print information about the same item type from another manufacturer that closes in price to the output item. Only print this if the same item from another manufacturer is in the inventory and is not damaged nor past its service date. iv. After output for one query, query the user again. Allow ‘q’ to quit. Commit all your .py files on Github. Provide a link on BlackBoard. Name all your files with the starting pharase “FinalProject” for example FinalProjectInput.py Comment your code extensively. Include comment block with your name and student ID at the top of every .py file. Presentation: You have to create a short presentation of your project: maximum 3 minutes. Describe your approach and the structure of your code (including your choices) for both Class Projects Part 1 and 2. 1) Create a PowerPoint (maximum 4 slides) 2) Add voice over comments to each slide 3) Save as a video (MP4) 4) Upload to Microsoft STREAM (you need to login with your UH account) 5) Give access to everybody Provide the link to your video on BlackBoard import csv import datetime class Manufacturer: # class manufacturer constructor def __init__(self, item_id, name, item_type, condition): self.item_id = item_id self.name = name self.item_type = item_type self.condition = condition def __str__(self): # return type string for the class return str(self.item_id) + "," + self.name + "," + self.item_type + "," + self.condition def __eq__(self, other): # uniquify all instances if isinstance(other, Manufacturer): return other.item_id == self.item_id and other.name == self.name \ and other.type == self.item_type and other.condition == self.condition class Price: # class price constructor def __init__(self, item_id, price, items): self.item_id = item_id self.price = price self.name = None self.item_type = None self.condition = None self.match_data(items) # create a function to match pre-loaded data def match_data(self, items): for i in items: if i.item_id == self.item_id: self.name = i.name self.item_type = i.item_type self.condition = i.condition def __str__(self): return str(self.item_id) + "," + self.name + "," + self.item_type + "," + self.condition + "," + str(self.price) class ServiceDates: # ServiceDates constructor def __init__(self, item_id, date, items): self.item_id = item_id self.date = date self.name = None self.item_type = None self.condition = None self.price = None self.match_data(items) # create a function to match the pre-loaded data def match_data(self, items): for i in items: if i.item_id == self.item_id: self.name = i.name self.item_type = i.item_type self.condition = i.condition self.price = i.price # define class objects as strings def __repr__(self): if self.condition: return str((self.item_id, self.name, self.item_type, self.price, self.date, self.condition)) else: return str((self.item_id, self.name, self.item_type, self.price, self.date)) def read_manufacturer_data_file(filename): # Function to read manufacturer data entries = [] data = [] file = open(filename, "r") for line in file.readlines(): data.append(line.strip().split(",")) file.close() for i in data: try: entries.append(Manufacturer(str(i[0]).strip(), str(i[1]).strip(), str(i[2]).strip(), str(i[3]).strip())) except: entries.append(Manufacturer(str(i[0]).strip(), str(i[1]).strip(), str(i[2]).strip(), None)) return entries def read_price_data_file(filename, manufacturer_data): # Function to read prices of the items entries = [] data = [] file = open(filename, "r") for line in file.readlines(): data.append(line.strip().split(",")) file.close() for i in data: entries.append(Price(str(i[0]).strip(), str(i[1]).strip(), manufacturer_data)) return entries def read_service_dates_data_file(filename, manufacturer_price_data): # Function to read service dates of the items entries = [] data = [] file = open(filename, "r") for line in file.readlines(): data.append(line.strip().split(",")) file.close() for i in data: entries.append(ServiceDates(str(i[0]).strip(), str(i[1]).strip(), manufacturer_price_data)) return entries def create_full_inventory_file(data, filename): # Function to create report file for all inventory file = open(filename, "w") for i in data: try: file.write(i.item_id + ", " + i.name + ", " + i.item_type + ", " + i.price + ", " + i.date + ", " + i.condition + "\n") except: file.write(i.item_id + ", " + i.name + ", " + i.item_type + ", " + i.price + ", " + i.date + "\n") file.close() def create_each_inventory_file(data): # Function to create report file for each inventory inventory = dict() for i in data:
Answered Same DayJul 08, 2021

Answer To: Microsoft Word - CIS2348_FinalProject_Part2.docx CIS 2348, Spring 2021 XXXXXXXXXXFinal Project Part2...

Pratap answered on Jul 09 2021
152 Votes
Functionalities which are extended on top of previously generated program are:
· Adding a new funct
ion to get the user input for the search parameters.
· Function will ask for user to input search query for the item, which the user wants to check in the inventory.
· Function shall evaluate the empty input and displays the appropriate...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here