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 delimited 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. Required Output: 1) Processed Inventory Reports: a. FullInventory.csv -- all the items listed by row with all their information . The items should be sorted alphabetically by manufacturer. Each row should contain item ID, manufacturer name, item type, price, service date, and list if it is damaged. The item attributes must appear in this order. b. Item type Inventory list, i.e LaptopInventory.csv -- there should be a file for each item type and the item type needs to be in the file name. Each row of the file should contain item ID, manufacturer name, price, service date, and list if it is damaged. The items should be sorted by their item ID. c. PastServiceDateInventory.csv – all the items that are past the service date on the day the program is actually executed. Each row should contain: item ID, manufacturer name, item type, price, service date, and list if it is damaged. The items must appear in the order of service date from oldest to most recent. d. DamagedInventory.csv –all items that are damaged. Each row should contain: : item ID, manufacturer name, item type, price, and service date. The items must appear in the order of most expensive to least expensive. 2) Interactive Inventory Query Capability a. Query the user of an item by asking for manufacturer and item type. 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. Manufacturer List 1167234,Apple ,phone, 2390112,Dell,laptop, 9034210,Dell,tower, 7346234,Lenovo,laptop,damaged 3001265,Samsung,phone, 2347800,Apple ,laptop, 1009453,Lenovo,tower, Service Date List 9034210,5/27/2020 2390112,7/2/2020 2347800,7/3/2020 7346234,9/1/2020 1009453,10/1/2020 1167234,2/1/2021 3001265,12/1/2023 Price List 3001265,1200 2347800,999 2390112,799 1009453,599 1167234,534 9034210,345 7346234,239 Full Inventory List 2347800,Apple ,laptop,999,7/3/2020, 1167234,Apple ,phone,534,2/1/2021, 2390112,Dell,laptop,799,7/2/2020, 9034210,Dell,tower,345,5/27/2020, 7346234,Lenovo,laptop,239,9/1/2020,damaged 1009453,Lenovo,tower,599,10/1/2020, 3001265,Samsung,phone,1200,12/1/2023, Laptop Inventory 2347800,Apple ,999,7/3/2020, 2390112,Dell,799,7/2/2020, 7346234,Lenovo,239,9/1/2020,damaged Past Service Date Inventory 9034210,Dell,tower,345,5/27/2020 Damaged Inventory 7346234,Lenovo,laptop,239,9/1/2020
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 delimited 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. Required Output: 1) Processed Inventory Reports: a. FullInventory.csv -- all the items listed by row with all their information . The items should be sorted alphabetically by manufacturer. Each row should contain item ID, manufacturer name, item type, price, service date, and list if it is damaged. The item attributes must appear in this order. b. Item type Inventory list, i.e LaptopInventory.csv -- there should be a file for each item type and the item type needs to be in the file name. Each row of the file should contain item ID, manufacturer name, price, service date, and list if it is damaged. The items should be sorted by their item ID. c. PastServiceDateInventory.csv – all the items that are past the service date on the day the program is actually executed. Each row should contain: item ID, manufacturer name, item type, price, service date, and list if it is damaged. The items must appear in the order of service date from oldest to most recent. d. DamagedInventory.csv –all items that are damaged. Each row should contain: : item ID, manufacturer name, item type, price, and service date. The items must appear in the order of most expensive to least expensive. 2) Interactive Inventory Query Capability a. Query the user of an item by asking for manufacturer and item type. 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.
Manufacturer List
1167234,Apple ,phone,
2390112,Dell,laptop,
9034210,Dell,tower,
7346234,Lenovo,laptop,damaged
3001265,Samsung,phone,
2347800,Apple ,laptop,
1009453,Lenovo,tower,
Service Date List
9034210,5/27/2020
2390112,7/2/2020
2347800,7/3/2020
7346234,9/1/2020
1009453,10/1/2020
1167234,2/1/2021
3001265,12/1/2023
Price List
3001265,1200
2347800,999
2390112,799
1009453,599
1167234,534
9034210,345
7346234,239
Full Inventory List
2347800,Apple ,laptop,999,7/3/2020,
1167234,Apple ,phone,534,2/1/2021,
2390112,Dell,laptop,799,7/2/2020,
9034210,Dell,tower,345,5/27/2020,
7346234,Lenovo,laptop,239,9/1/2020,damaged
1009453,Lenovo,tower,599,10/1/2020,
3001265,Samsung,phone,1200,12/1/2023,
Laptop Inventory
2347800,Apple ,999,7/3/2020,
2390112,Dell,799,7/2/2020,
7346234,Lenovo,239,9/1/2020,damaged
Past Service Date Inventory
9034210,Dell,tower,345,5/27/2020
Damaged Inventory
7346234,Lenovo,laptop,239,9/1/2020
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images