• Lab 1:
    • Create a new primitive called primlab1.
    • Copy the skeleton of the primitive and paste it into your file.
      • Code skeleton: primlab1.java
      • Be sure to save the above file as primlab1.java (all lower-case)! Put it in the prim area of your option tree.
      • On the first line of the file you will need to change the package to match your option tree.
    • Fill in the missing code:
      • This is a primitive that will count from 1 to 20 and then stop.
        nM> primlab1
        INFO: inside open() [PRIMLAB1]
        INFO: inside process() count = 1 [PRIMLAB1]
        INFO: inside process() count = 2 [PRIMLAB1]
        ...
        INFO: inside process() count = 20 [PRIMLAB1]
        INFO: inside close() [PRIMLAB1]
      • You will need to initialize count.
      • You will need to increment count as appropriate.
      • You will need to add appropriate return statements to open(), process(), and close() so that it will count to 20 and then stop.
    • Use UPDATE to update the command dictionary.
    • Use BUILD or BLD to build the primitive.
    • Once you are done, give it a try. The output should match the example given above.