<?xml version="1.0"?>
<!DOCTYPE activity SYSTEM "escot.dtd" >
<activity name="My Activity" size="640,420" escotVersion="1.2.11" puzzle_id="20">
  <page name="Introduction">
    <component class="org.escot.demo.TextEditor" position="13,5" size="401,334" visible="true" portid="TextEditor-2">
      <![CDATA[  You have been hired as an analyst by "As the Shoe Fits," a local shoe store. Your first assignment is to experiment with methods that will make it easy for customers to decide which length of shoelace will best fit their sneakers.

  It seems that many customers have been unhappy with the laces they've chosen in the past.  Most have chosen lace lengths which are either so long they have to be double knotted or too short to make a decent bow.

  Your boss has asked you to create a guide for choosing shoelaces, and to show her a graph with your progress ASAP (as soon as possible). You went out and did a survey of shoes in the neighborhood, looking for shoes in which the laces were the perfect length. You've counted the eyelets and measured the length of the lace (in centimeters) for each of those shoes. 

  Turn to Page 2 to graph the points, find the line of best fit and then use the line to help customers choose shoelace lengths. When you are done you should have a graph that looks similar to one of the graphs shown here. (Click on the "2" at the top of this page to get to the next page.)]]>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="255,255,255"/>
      <property name="font" value="Application,Application,0,10"/>
    </component>
    <component class="org.escot.demo.SimpleGraph" position="428,44" size="191,133" portid="SimpleGraph-1" visible="true">
      <property name="TraceXPrecision" value="2"/>
      <property name="VDottedLineColor" value="128,128,128"/>
      <property name="TraceColor" value="255,0,0"/>
      <property name="labelInterval" value="1,5"/>
      <property name="TraceYPrecision" value="2"/>
      <property name="derivative" value="0"/>
      <property name="HDottedLineColor" value="128,128,128"/>
      <property name="VDottedLineOn" value="true"/>
      <property name="TraceOn" value="false"/>
      <property name="HDottedLineOn" value="true"/>
      <property name="xAxisName" value="X"/>
      <property name="scrollable" value="false"/>
      <property name="TraceDrawCrosses" value="true"/>
      <property name="extent" value="-2.0,-2.5,12.0,18.5"/>
      <property name="tickInterval" value="1,1"/>
      <property name="yAxisName" value="Y"/>
    </component>
    <component class="virtuoso.logo.LogoScript" position="5,495" size="26,13" visible="false" portid="LogoScript-1">
      <export name="points" type="ordered pair">((0,0,0),(1.0,12.2),(2.0,10.0),(3.0,11.5),(4.0,8.5),(5.0,7.8),(6.0,5.0),(7.0,6.5),(8.0,4.0))</export>
      <export name="points2" type="ordered pair">((0,0,0),(85.0,120.0),(73.0,100.0),(137.0,115.0),(52.0,65.0),(41.0,78.0),(32.0,50.0),(25.0,65.0),(10.0,60.0))</export>
      <![CDATA[make "points [[1 12.2] [2 10] [3 11.5] [4 8.5] [5 7.8] [6 5] [7 6.5] [8 4]]
make "points2 [[85 120] [73 100] [137 115] [52 65] [41 78] [32 50] [25 65] [10 60]]]]>
      <property name="toolBarShowing" value="false"/>
    </component>
    <component class="org.escot.demo.SimpleFunction" position="114,459" size="197,35" visible="false" portid="SimpleFunction-1">
      <property name="color" value="255,0,51"/>
      <property name="font" value="Dialog,Dialog,0,12"/>
      <property name="name" value="Parabola"/>
      <property name="a2" value="0.0"/>
      <property name="a1" value="-1.0"/>
      <property name="a0" value="13.0"/>
    </component>
    <component class="org.escot.demo.SimpleGraph" position="428,185" size="192,152" portid="SimpleGraph-2" visible="true">
      <property name="TraceXPrecision" value="2"/>
      <property name="VDottedLineColor" value="128,128,128"/>
      <property name="TraceColor" value="255,0,0"/>
      <property name="labelInterval" value="5,2"/>
      <property name="TraceYPrecision" value="2"/>
      <property name="derivative" value="0"/>
      <property name="HDottedLineColor" value="128,128,128"/>
      <property name="VDottedLineOn" value="true"/>
      <property name="TraceOn" value="false"/>
      <property name="HDottedLineOn" value="true"/>
      <property name="xAxisName" value="X"/>
      <property name="scrollable" value="false"/>
      <property name="TraceDrawCrosses" value="true"/>
      <property name="extent" value="-30.0,-30.0,190.0,180.0"/>
      <property name="tickInterval" value="10,12"/>
      <property name="yAxisName" value="Y"/>
    </component>
    <component class="org.escot.demo.SimpleFunction" position="5,528" size="197,35" visible="false" portid="SimpleFunction-2">
      <property name="color" value="0,153,0"/>
      <property name="font" value="Dialog,Dialog,0,12"/>
      <property name="name" value="Parabola"/>
      <property name="a2" value="0.0"/>
      <property name="a1" value="0.65"/>
      <property name="a0" value="40.0"/>
    </component>
    <component class="com.sri.escot.EscotLabel" position="457,15" size="136,16" visible="true">
      <property name="text" value="Sample Graphs"/>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="204,204,204"/>
      <property name="font" value="Dialog,Dialog,0,12"/>
    </component>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="points"/>
      <to portid="SimpleGraph-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleFunction-1" name="Parabola"/>
      <to portid="SimpleGraph-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="LogoScript-1" name="points2"/>
      <to portid="SimpleGraph-2" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleFunction-2" name="Parabola"/>
      <to portid="SimpleGraph-2" name=""/>
    </wire>
  </page>
  <page name="Plot and Fit">
    <component class="org.escot.demo.SimpleGraph" position="431,145" size="203,250" portid="SimpleGraph-1" visible="true">
      <property name="TraceXPrecision" value="2"/>
      <property name="VDottedLineColor" value="128,128,128"/>
      <property name="TraceColor" value="255,0,0"/>
      <property name="labelInterval" value="1,2"/>
      <property name="TraceYPrecision" value="2"/>
      <property name="derivative" value="0"/>
      <property name="HDottedLineColor" value="128,128,128"/>
      <property name="VDottedLineOn" value="true"/>
      <property name="TraceOn" value="false"/>
      <property name="HDottedLineOn" value="true"/>
      <property name="xAxisName" value="Eyelets"/>
      <property name="scrollable" value="false"/>
      <property name="TraceDrawCrosses" value="true"/>
      <property name="extent" value="-4.0,-20.0,29.0,232.0"/>
      <property name="tickInterval" value="3,10"/>
      <property name="yAxisName" value="Length (cm)"/>
    </component>
    <component class="com.ttools.PENWrapper" position="430,143" size="212,253" portid="PENWrapper-1" visible="true">
      <property name="doFitLine" value="false"/>
      <property name="ProgramFilename" value="prgs/plotPoints.prg"/>
    </component>
    <component class="org.escot.demo.SimpleFunction" position="5,478" size="276,35" portid="SimpleFunction-1" visible="false">
      <property name="color" value="255,51,102"/>
      <property name="font" value="Dialog,Dialog,0,12"/>
      <property name="name" value="Parabola"/>
      <property name="a2" value="0.0"/>
      <property name="a1" value="0.0"/>
      <property name="a0" value="-100.0"/>
    </component>
    <component class="org.escot.demo.BooleanEntry" position="488,401" size="83,21" portid="BooleanEntry-1" visible="true">
      <property name="maximumSize" value="83,21"/>
      <property name="enabled" value="true"/>
      <property name="components" value="[Ljava.awt.Component;@650e8a"/>
      <property name="preferredSize" value="83,21"/>
      <property name="foreground" value="0,0,0"/>
      <property name="label" value="Show Line"/>
      <property name="visible" value="true"/>
      <property name="background" value="204,204,204"/>
      <property name="insets" value="java.awt.Insets[top=0,left=0,bottom=0,right=0]"/>
      <property name="componentCount" value="1"/>
      <property name="value" value="false"/>
      <property name="font" value="Dialog,Dialog,0,12"/>
      <property name="layout" value="javax.swing.BoxLayout@bc3fe6"/>
      <property name="accessibleContext" value="javax.swing.Box$AccessibleBox@65431f"/>
      <property name="alignmentY" value="0.47619048"/>
      <property name="alignmentX" value="0.5"/>
      <property name="minimumSize" value="83,21"/>
      <property name="port" value="Port[BooleanEntry-1]"/>
      <property name="selected" value="false"/>
    </component>
    <component class="org.escot.demo.TextEditor" position="5,5" size="421,245" visible="true" portid="TextEditor-3">
      <![CDATA[To Do:
1. Plot the Data
Plot the points (eyelets, length) on the coordinate plane. Use the mouse to move the arrow to the coordinates of each point in the chart and then click to put the point there. If you try to plot a point that is not in the chart, you will see an error message.(NOTE: When you save and reopen the activity the points will have to be re-plotted. Also, the plotter won't work unless you are connected to the internet)

2. Find the Line of Best Fit
After you've plotted all the points in the chart, select the "Show Line" checkbox. Use the line-fitting tool (the blue and red dots) to create a line of best fit.  You can drag the red dot to change the steepness of the line, or drag the blue dot to change the line's vertical position on the graph.
]]>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="255,255,255"/>
      <property name="font" value="Application,Application,0,10"/>
    </component>
    <component class="org.escot.demo.AppendingTextEd" answerText="true" position="307,455" size="191,158" visible="false" portid="AppendingTextEd-1">
      <![CDATA[Plotted Points:
(12, 43)
correct: (4, 46)
Plotted Points:
Plotted Points:
Plotted Points:
Plotted Points:
]]>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="255,255,255"/>
      <property name="font" value="Application,Application,0,10"/>
      <property name="editable" value="true"/>
    </component>
    <component class="org.escot.demo.TextEditor" answerText="true" position="5,256" size="418,159" visible="true" portid="TextEditor-5">
      <![CDATA[Use your graph to answer these questions.

A) What length shoelace will best fit a shoe with 18 eyelets?


B)  You are going to display this graph in the shoelace department of As the Shoe Fits. Write clear directions for customers which describe how to use the graph to determine which length of shoelace to purchase.

]]>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="255,255,185"/>
      <property name="font" value="Application,Application,0,10"/>
    </component>
    <component class="org.escot.demo.AppendingTextEd" position="453,5" size="151,132" visible="true" portid="AppendingTextEd-2">
      <![CDATA[Eyelets  Length
    4     46cm
    6     69cm
    8     91cm
   10    102cm
   12    114cm
   14    137cm
   16    160cm
   20    183cm]]>
      <property name="foreground" value="0,0,0"/>
      <property name="background" value="255,255,255"/>
      <property name="font" value="Application,Application,0,10"/>
      <property name="editable" value="false"/>
    </component>
    <wire type="org.escot.Broker">
      <from portid="SimpleGraph-1" name="x_anchor"/>
      <to portid="PENWrapper-1" name="x_anchor"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleGraph-1" name="y_anchor"/>
      <to portid="PENWrapper-1" name="y_anchor"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleGraph-1" name="x_pixPerUnit"/>
      <to portid="PENWrapper-1" name="x_pixPerUnit"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleGraph-1" name="y_pixPerUnit"/>
      <to portid="PENWrapper-1" name="y_pixPerUnit"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="PENWrapper-1" name="slope"/>
      <to portid="SimpleFunction-1" name="b"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="PENWrapper-1" name="y_intercept"/>
      <to portid="SimpleFunction-1" name="c"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="PENWrapper-1" name="showPairs"/>
      <to portid="SimpleGraph-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="BooleanEntry-1" name="true"/>
      <to portid="PENWrapper-1" name="doFitLine"/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="SimpleFunction-1" name="Parabola"/>
      <to portid="SimpleGraph-1" name=""/>
    </wire>
    <wire type="org.escot.Broker">
      <from portid="PENWrapper-1" name="plottedPoint"/>
      <to portid="AppendingTextEd-1" name=""/>
    </wire>
  </page>
</activity>

