The wood-screw inventory

Problem description

Write a C program that keeps an inventory of different sizes of wood-screw. The sizes are 4, 6, 8, 10, and 12. Assume all the screws are the same length, and made from the same material. The program should start from a zero inventory and be able to accept input in the form of a screw size and an amount by which to increase or decrease (if negative) the holding of that size of screw. . The cost of each supply item is constant and is hard-coded in the program. At the end of the input, a list of screw sizes, their amounts and the total money worth of the inventory should be printed.

Procedure

Follow these steps to end up with a successful program:

  1. Write a one sentence problem statement.
  2. Write the problem description, as given above.
  3. Do a TDSR analysis for tasks and subtasks. Draw the TDSR diagram that you get from this analysis.
  4. Write a C program code from your analysis in 3.
  5. Create a source file using the editor.
  6. Compile the source code using gcc.
  7. The program should create an "empty" inventory that can handle the screw sizes mentioned above, here with their unit cost:

    4 $0.30
    6 $0.35
    8 $0.45
    10 $0.50
    12 $0.65
  8. Deliverables:

Notes and hints

Due Date

Submit your completed assignment before 5pm. on Friday March 21st.