COMP 310
Fall 201

Extended Visitor Demo

Home  Info  Canvas   Java Resources  Eclipse Resources  Piazza

The demo should appear on your screen in its own window. To restart the demo, refresh/reload this page.

     extVisitor documentation   Branch the code from the SVN repository: 


To Make a New Host:  

  1. Type in a unique identifier in the ID textfield
  2. Click Make Host button.   The new host will appear in the drop list.

To Make a New Visitor:  

  1. Type in a unique name in the Make Visitor with name: textfield
  2. Click the Make Visitor with name button.   The new visitor will appear in the drop list.    The new visitor will only have a default case defined.

To Add or Replace a Command in a Visitor:  

  1. Type the desired host ID to be associated with the new command in the ID textfield.
  2. From the visitor drop list, select the desired visitor in which to add/replace the command.
  3. In the Make Cmd for Visitor for ID textfield, type in the desired result for running the new command on the given host.
  4.  Click the Make Cmd for Visitor for ID button to either add the new command to the selected visitor or to replace any exisiting command in that visitor associated wtih the given host ID.


Be sure to try all the multitude of permutations that are possible with this simple demo!

Note:  This demo allows run-time modifications of the visitor algorithms for illustration purposes.   In a real-life situation, where the possibility of malicious hacking exists, this feature might be removed to increase the security of the system.  The ability to change the commands at run-time is not part of the fundamental notions of the extended visitor and is something that one would only include in scenarios where dynamic re-programming of the system is required.


© 2016 by Stephen Wong