Hint to process a comment (lab 8)

20 Jun 2023 - 16:06 | Version 1 |
  • get the item from the command file
  • find the location of it in the items file
  • if the instruction is to display the stat, just call a method
  • If the instruction is to add things to the stock of that item
    • get the amount from the command line
    • change the inventory file (send the line number, amount, name of inventory file, and name of output file)
  • if the instruction is to remove things from inventory
    • get the amount from the command line and make it negative
    • change the inventory file (send the line number, amount, name of inventory file, and name of output file)
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine