> > |
| META TOPICPARENT |
name="CSC121F2023Lab08" |
Hint to process a comment (lab 8)
- 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)
|