Difference: CSC121F2023Lab08Hint1 ( vs. 1)

Revision 12023-06-20 - cathybareiss

Line: 1 to 1
Added:
>
>
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)
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback