My Paper Writer » Essay Blog » Essay Writing Service Cheapest » Inventory Accounting Program

Inventory Accounting Program

Consider how you might modularize the code in your project. What kind of data will the functions take as arguments and what kind of data will the functions return? Where will the functions be called? Modify your pseudocode and flowchart(s) from Module 04 by modularizing the program using functions as appropriate. You should continue working on translating your project’s pseudocode into C++ code and testing it.

Inventory Accounting Program – Pseudocode and Flowchart


  1. Start
  2. Declare totalInventoryItems as Whole Number
  3. Set totalInventoryItems to 50
  4. Declare 1-Dimentional arraysItemCodes, ItemNames, ItemDescas Text with length of totalInventoryItems
  5. Declare 1-Dimentional arrays ItemQtyInStock, ItemQtySold as Whole Number of length of totalInventoryItems
  6. Declare 1-Dimentional arrays ItemWCost, ItemRCost as Fractional Numbers of length of totalInventoryItems
  7. Set ItemsListIndex = 0
  8. Declare variable myOptionas Whole Number
  9. Set myOption = 0
  10. Display Menu
    1. Display “1. Add Item to Inventory”
    2. Display “2. Remove Item from Inventory”
    3. Display “3. Edit Inventory Item”
    4. Display “4. Show Inventory Item Info”
    5. Display “5. Quit Program”
  11. Display “Enter your Choice”
  12. Read myOption
  13. While myOptionis not equal to 5
  14. If myOption is 1
    1. Display “Enter Item Info:”
    2. Read Item Code into ItemCode at ItemsListIndex
  • Read Item Name into ItemName at ItemsListIndex
  1. Read Item Description into ItemDesc at ItemsListIndex
  2. Read the Wholesale Cost into ItemWCost at ItemsListIndex
  3. Read the Retail Cost into Item at ItemsListIndex
  • Read the Quantity in Stock into ItemQtyInStock at ItemsListIndex
  • Read the Quantity Sold into ItemQtySold at ItemsListIndex
  1. Set ItemsListIndex to ItemsListIndex + 1 at ItemsListIndex
  1. End If
  2. Else If myOption is 2
    1. Get Index of Item to Remove (Search the ItemCodes array)
      1. Declare ItemIndex as Whole Number
      2. Set ItemIndex to 0
      3. Declare inputCode as Text
      4. Display “Enter the Item Code”
      5. Read inputCode
      6. While ItemIndex is less than ItemsListIndex
        1. Traverse the ItemCodes array at ItemIndex position
        2. If ItemCode=inputCode
          1. Exit from Loop
  • End If
  1. Set ItemIndexto ItemIndex+ 1
  1. End While
  1. If ItemIndex = ItemsListIndex
    1. Display “No Match found”
  • End If
  1. Else
    1. Declare Text as Choice
    2. Declare Choice as Empty
    3. Display “Are you sure you want to delete? Y or N”
    4. Input Choice
    5. If Choice is Y
      1. Declare Temp Text arrays of length totalInventoryItems for ItemNames and ItemDesc
      2. Declare Temp Fractional Number arrays of length totalInventoryItemsfor ItemWCost and ItemRCost
      3. Declare Temp Whole Number arrays of length totalInventoryItemsfor ItemQtyInStock and ItemQtySold
      4. Copy ItemCodes from 0 to ItemIndex-1 into Temp arrays
      5. Copy ItemCodes from ItemIndex+1 to ItemsListIndex -1 into Temp arrays
      6. Copy Temp arrays to ItemCodes array
      7. Repeat Steps 4 to 6 for ItemNames, ItemDesc, ItemWCost, ItemRCost, ItemQtyInStock and ItemQtySold arrays
      8. Set ItemsListIndex to ItemsListIndex– 1
      9. Display “Item Deleted Successfully”
    6. End If
  2. End Else
  1. End If
  2. Else If myOption is 3
    1. Get Index of Item to Edit (See Step C-i.)
    2. If ItemIndex = ItemsListIndex
      1. Display “No match found”
  • End If
  1. Else
    1. Display “Leave prompt empty if do not want to edit”
    2. Declare Value as Text
    3. Set Value to Empty
    4. Declare Textname, desc,
    5. Declare Fractional Numbers wcost, rcost
    6. Declare Whole NumbersqtyInStock, qtySold
    7. Set name to ItemName at EditItemIndex
    8. Set desc to ItemDesc at EditItemIndex
    9. Set wcost to ItemWCost at EditItemIndex
    10. Set rcost to ItemRCost at EditItemIndex
    11. Set qtyInStock to ItemQtyInStock at EditItemIndex
    12. Set qtySold to ItemQtySold at EditItemIndex
    13. Display “Item Name” and name
    14. Read Value
    15. If Value is not Empty
      1. Replace name with value
    16. End If
    17. Repeat Step 11 to 14 for desc, Wcost, rcost, qtyInStock,QtySold
    18. Store variables from Step 4 to their respective arrays at ItemIndex
  2. End Else
  1. End If
  2. If myOption is 4
    1. Get Item Index to Show (Call Step C-i)
    2. If ItemIndex = ItemsListIndex
      1. Display “No match found”
  • End If
  1. Else
    1. Display “Requested Item Information”
    2. Display Item Code
    3. Display Item Name
    4. Display Item Description
    5. Display Item Quantity
    6. Display Wholesale Cost
    7. Display Retail Cost
    8. Display Quantity in Stock
    9. Display Quantity Sold
  2. End Else
  1. End If
  2. Else
    1. Display “Invalid Option”
  3. End Else
  4. Display Menu from Step 10
  5. Display “Enter your Choice”
  6. Read myOption
  7. End While
  8. Display “Program Ended”
  9. Stop


Getting Custom Writing Service with any of your academic assignments is easy. Simply click here.

Last Updated on July 1, 2021

Don`t copy text!
Scroll to Top