You are asked to write a program that manages a company's stock. To manage the stock the
program need to keep track of item information, prices and quantities. A user should be able
to adjust these values on selected items, draw reports and perform certain functions over all
the data. The data is also to be kept after the program closes.
A text-based menu driven program should be created. This program will keep track of the
stock by given the user to option to interact with the data stored. Note that you may choose
the type of shop you write the program for. For example, if you choose to write this program
specically for a car dealer and item types only cater for cars, you may do so as long as all
the listed features are applicable for the store type.
You are required to implement basic features (such as adding, deleting, editing and searching
an item) as well as more advanced functions (as dened below).
1. A Stock Item is the description of the item in the store. It has at least the following
2. The program should keep track of the stock item descriptors and the amount of that
item in the store. For example, BarOne 15, Tex 1, Crunchie 6 etc.
3. Basic Functions:
(a) Add a new item
The user is prompted to enter the necessary details to create a new stock
item. The user should also enter the amount that is currently in stock.
The new item should be added to the collection of items and the quantity
should also be saved.
(b) Search an item by name
View the item
A user is prompted to enter the name of the item she wants to view.
A (case insensitive, preferably) search should be done. If found the
item should be displayed on the screen. If not, an appropriate error
message must be displayed.
Delete the item
Making use of the same search function as view, a user may delete a
stock item. A conrmation message must be displayed to ensure an
item is not delete by accident.
Edit item quantity
Making use of the same search function as view, a user may edit the
amount of items currently in stock.
(a) Display all items (sorted by Name or Retail Price)
It should be possible to list all items in the store with their quantities.
When a user selects the option to view this report he should be asked
whether she wants to sort the report by Name or by Retail Price.
(b) Display all items of a specic Manufacturer
A report should be available where all items of a specic manufacturer (as
entered by the user) are displayed.
5. Advanced functions:
(a) Recalculate retail price. Given the markup percentage, calculate the retail price
of each item by adding that percentage to the cost price.
The owner of the store want to adjust the price markup applied to the
items in the store. To save him the schlep of changing the retail price
for each item individually, write a function that will add the percentage
entered by the user to the cost price (in calculation of the new retail
price) of each of the items in the store.
(b) Calculate the total worth (that is, from the cost price) of the stock.
The owner of the store needs to know what the value is of all the stock in
the store. Write a function that will calculate the total value (making
use of the Cost price) of all items in the store.
6. Data should be kept when the program closes.
Upon exit, all the data (the descriptors and quantities) must be written to a le
such that it can be read again (when the program starts). You should thus
be able to make changes to the program data, close the program, reopen it
and continue with the data as if the program did not close.
Ive attempted the program and was not successful. Can anyone show me how to do it.It needs to include Abstract Data Types, pointers, functions, arrays,
file input and output and general programming.