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)
This topic: CenterForComputing
> WebHome >
Syllabi >
CSC121SylF2023 >
CSC121F2023Lab08 > CSC121F2023Lab08Hint1
Topic revision: r1 - 2023-06-20 - cathybareiss