Page 1 of 1

IN C++ NOTE: do not use classes or pointers for Lab 6 - Part B. You are only to use struct data to build your inventory

Posted: Tue Jul 12, 2022 8:28 am
by answerhappygod
IN C++ NOTE: do not use classes or pointers for Lab 6 -Part B. You are only to use struct data to build yourinventory database.
Write a program that simulates inventory bins in awarehouse. Each bin holds a number of the same type ofparts. The program should use a structure that keeps thefollowing data:
Description of the part kept in the bin
Number of parts in the bin
The program should have an array of 10 bins, initialized withthe following data:
-------------------------------------------------------
Part Description Number of parts inthe bin
--------------------------------------------------------
Valve 10
Bearing 5
Bushing 15
Coupling 21
Flange 7
Gear 5
Gear Housing 5
Vacuum Gripper 25
Cable 18
Rod 12
----------------------------------------------------------
The program should have the following functions:
AddParts: increases a specific bin's part count by aspecified number.
RemoveParts: decreases a specific bin's part count by aspecific number.
When the program runs, it should repeat a loop that performs thefollowing steps:
The user should see a list of what each bin holds and how manyparts are in each bin. The user can choose to either quit theprogram or select a bin. When a bin is selected, the user caneither add parts to it or remove parts from it. The loop thenrepeats, showing the updated bin data on the screen.
Input Validation: No bin can hold more than 30parts, so don't let the user add more than a bin can hold. Also, don't accept negative values for the number of part beingadded or removed. Do not use classes nor pointers for thelab. Use of anything else than structure data (struct -ch.11) to build your inventory will receive zero.