<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration CreatedTime="0" ModifiedTime="0" Name="" RootStep="1">
  <Steps DisplayX="69" DisplayY="181" Id="1" Name="Welcome">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Hi, &lt;%USER_NAME%&gt;, and welcome to the wonderful world of linked lists!"/>
    <Transitions DestId="10" InputValue="0" PauseDuration="1000" StimulusId="0"/>
  </Steps>




<Steps DisplayX="236" DisplayY="295" Id="10" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Linked lists are a fundamental data structure in Computer Science, but they're really tricky."/>
    <Transitions DestId="20" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>
  <Steps DisplayX="236" DisplayY="295" Id="20" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="First off, lets show you around this lesson and how you can solve some problems."/>
    <Transitions DestId="30" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="30" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Over here, we have a little scratch pad. I'll jot some notes down here about the problem you're working on"/>
    <Actions ActionId="2" ActionType="HighlightUiComponent" DataStr="name=ScratchPane"/>
    <Transitions DestId="40" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="40" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="I just wrote something in it as a reminder"/>
    <Actions ActionId="2" ActionType="SetScratchText" DataStr="text=This is the scratch pad"/>
    <Transitions DestId="50" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="50" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Down here, we'll be able to draw some linked lists."/>
    <Actions ActionId="2" ActionType="HighlightUiComponent" DataStr="name=PrimaryPane"/>
    <Transitions DestId="60" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="60" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="I like this window, you can move things around in it too, not that it will affect the solution"/>
    <Transitions DestId="70" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="70" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="So how do you go about solving a problem, I hear you ask."/>
    <Transitions DestId="80" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="80" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Simple, here on the right, is a place where you can type some commands in, either in Java or C. What you type here will affect the linked list you're working on"/>
    <Actions ActionId="2" ActionType="HighlightUiComponent" DataStr="name=SecondaryPane"/>
    <Transitions DestId="90" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="90" Name="Problem setup">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Why don't we give it a go! I'll set up a very small list with a couple of nodes"/>
    <Actions ActionId="2" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=Node *T = new Node;&amp;record=true"/>
    <Actions ActionId="3" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=T->data = 1;&amp;record=true"/>
    <Actions ActionId="4" ActionType="ExecuteCommand" DataStr="::cmd=MoveNode&amp;val=1&amp;x=200&amp;y=50"/>
    <Actions ActionId="5" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=Node *S = new Node;&amp;record=true"/>
    <Actions ActionId="6" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=S->data = 2;&amp;record=true"/>
    <Actions ActionId="7" ActionType="ExecuteCommand" DataStr="::cmd=MoveNode&amp;val=2&amp;x=300&amp;y=110"/>
    <Actions ActionId="8" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=T.link=S;&amp;record=true"/>
    <Actions ActionId="9" ActionType="ExecuteCommand" DataStr="::cmd=Operation&amp;data=S=NULL;&amp;record=true"/>
    <Transitions DestId="100" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="100" Name="Problem statement">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Now lets do something really simple... how about adding a node to the end of this list!!"/>
    <Transitions DestId="110" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>  


  <Steps DisplayX="236" DisplayY="295" Id="110" Name="Create insert node">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="The very first step is simple, lets create a new node with a value of '3', and why don't we call it 'Z'"/>
    <Actions ActionId="2" ActionType="ExecuteCommand" DataStr="Node *Z = new Node;"/>
    <Actions ActionId="3" ActionType="ExecuteCommand" DataStr="Z->data = 3;"/>
    <Actions ActionId="4" ActionType="ExecuteCommand" DataStr="::cmd=MoveNode&amp;val=3&amp;x=400&amp;y=170"/>
    <Transitions DestId="130" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>


  <Steps DisplayX="236" DisplayY="295" Id="130" Name="Solution step 2">
    <Actions ActionId="1" ActionType="StopNodeHighlight" DataStr="id=2"/>
    <Actions ActionId="2" ActionType="TutorMessage" DataStr="Firstly, we should get access to the second node. This can be done by going through the root, T, and gettings its next node. This can be assigned to a variable, S"/>
    <Actions ActionId="3" ActionType="ExecuteCommand" DataStr="S = t->next"/>
    <Transitions DestId="140" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="140" Name="Solution step 3">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="From here, we could assign 2's next pointer to the node containing 3, like so"/>
    <Actions ActionId="2" ActionType="ExecuteCommand" DataStr="s->next = Z"/>
    <Transitions DestId="170" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>


  <Steps DisplayX="236" DisplayY="295" Id="170" Name="Solution step 9">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="and then tidy up some of the references, this being S and Z"/>
    <Actions ActionId="2" ActionType="ExecuteCommand" DataStr="remove S;"/>
    <Actions ActionId="3" ActionType="ExecuteCommand" DataStr="remove Z;"/>
    <Transitions DestId="180" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="180" Name="Conclusion">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="And there we go, we have added a new node to the end of the list"/>
    <Transitions DestId="185" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

<Steps DisplayX="236" DisplayY="295" Id="185" Name="Conclusion">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="Once you're happy with your list, you can press the 'Submit' button to give me your final answer for a quick check"/>
    <Transitions DestId="190" InputValue="0" PauseDuration="0" StimulusId="0"/>
  </Steps>

  <Steps DisplayX="236" DisplayY="295" Id="190" Name="Conclusion">
    <Actions ActionId="1" ActionType="TutorMessage" DataStr="There are plenty of problems for you to try, just click on the 'Problems' button and pick one. Don't worry, I'll be sticking around to help!"/>
  </Steps>


</configuration>
