Tool+Talk+for+Whole+Number+x+Multiplying+Fractions

== Tool Talk is used by various Fraction Tools to interface with the activity to allow the programmer to query the progress a student is making using the tool to model a specific mathematical expression. ==

When you create a Fraction Tool (Designer Squares, Fraction Strips, Pouring Containers, Hops on a Line), it automatically creates a toolTalk object that you then use to query the status of the tool (via getFeedback calls) - and you can also use to perform doFeedback animations (to correct incomplete models, or demonstrate solutions from scratch)

Whole Multiplying a Fraction Tool Talk - getFeedbackLevel  ^
The standard set of routines is called ToolTalk, and are accessed via the ** .toolTalk ** object (lowercase t in tool, uppercase T in Talk).

All tools have a ** .toolTalk.getFeedbackLevel ** routine defined, which will return an object that includes a level, as well as a number of other pieces of information that can be used by the activity to determine the proper course of action / feedback to continue with.

getFeedbackLevel requires 4 parameters: op Operation to be modelled. "x" num1 First number in operation (Number) num2 Second number in operation (Fraction) initObj An object that can contain optional parameters to customize how the feedback level is calculated

type: String - command that corresponds to animation action desired

clear: Boolean - whether or not to clear the contents of the tool before performing the animation (if false, then deal with what's already there)

animationType: String - used to control speed or style of animation ("slow", "normal", "fast", "instant" )

thisTypeOnly:Boolean - whether or not to do all actions leading up to requested command. (Default : FALSE - ie - always do animations that build to final command. If TRUE, then only do this specific animation based on command, irregardless of actual status of tool. Warning - this could have dangerous side effects, or, lead the tool to show misleading or incorrect models of an operation

For Multiplying a Whole Number by a Fraction, the feedback levels are as follows:
 * ~ Level ||~ Description of Feedback Level defined ||
 * < 0 ||< Haven't started using the tool ||
 * < 1 ||< Haven't added to workspace, design is OK ||
 * < 2 ||< Started but all wrong ||
 * < 3 ||< Started with some right and some wrong ||
 * < 4 ||< Started with some right, wrong mix ||
 * < 5 ||< Started but too little ||
 * < 6 ||< Started but too much ||
 * < 7 ||< Created with enough stuff but not simplified (does not apply to Hops) ||
 * < 8 ||< Complete and simplified ||
 * < 9 ||< Complete and simplified and wholes separated ||

code format="actionscript" var currFeedback : Object = myTool. toolTalk. getFeedbackLevel ( "x", 3 , new Fraction ( 2 , 3 ) ) ;

if ( currFeedback. level < 8 ) { trace ( "You are not quite complete yet." ) ; } This code will return traces based on each level from the above table. It uses a lot of if statements but it works!!! If you prefer you can use an array. code code format="actionscript" function checkModel { //checks to see if user uses the model correctly //!!!!!! need to define currentTool = whatTool; inside the // this.onToolReady = function(which, whatTool, whatPod, toolType, newOrExisting, stdOrActivity) // function defined on frame 1 !!!!! //this is checking to see if the user has modelled 3 x 2 1/3 properly - you may need to adjust this accordingly //need to import edu.clips.fraction.Fraction; so that new Fraction works var currFeedback: Object = currentTool. toolTalk. getFeedbackLevel ( "x", 3 , new Fraction ( 2 , 1 , 3 )) ; //x means multiply, 3 is the one number and 2 and 1/3 is the other number that should be modelled trace ( "current Feedback is " +currFeedback. level ) ; if ( currFeedback. level == 0 ) { trace ( "Not using tool yet." ) ; } else if ( currFeedback. level == 1 ) { trace ( "Haven't added to workspace, design in OK" ) ; } else if ( currFeedback. level == 2 ) { trace ( "Started but all wrong" ) ; } else if ( currFeedback. level == 3 ) { trace ( "Started with some right and some wrong" ) ; } else if ( currFeedback. level == 4 ) { trace ( "Started with some right, but not correct mix" ) ; } else if ( currFeedback. level == 5 ) { trace ( "Started but too little" ) ; } else if ( currFeedback. level == 6 ) { trace ( "Started but too much" ) ; } else if ( currFeedback. level == 7 ) { trace ( "Created with enough stuff but not simplified" ) ; } else if ( currFeedback. level == 8 ) { trace ( "Complete and simplified" ) ; } else if ( currFeedback. level == 9 ) { trace ( "Complete and simplified and wholes separated" ) ; } else { trace ( "feedback level is not defined in chart" ) ; } }

operator : String ("x") num1 : Number ( 3 ) num2 : Fraction initObject : Object (not used currently, but may be needed for future implementation)
 * getFeedbackLevel ** takes 3 input parameters ( a 4th one is defined in the official function definition, but not currently used)


 * getFeedbackLevel ** returns the following pieces in its return object:

.level : Number .designValue : new Fraction (undefined for some tools, such as fraction strips) .grandTotalMatch: Boolean (whether the sum is correct - use getSum to determine sum)

In addition, each tool keeps additional information, typically used for doFeedback, some of which might be interesting to an activity programmer, such as

.compResult = compareObject resulting from methods like ubObject.compareFractionArrays, which may include: code code format="actionscript" Back to Top
 * .missingArray
 * .extraArray
 * .matchingArray
 * .correctSum
 * .numInMatching : Number
 * .numInMissing : Number
 * .numInMatching : Number
 * .numInExtra : Number
 * .onlyAcceptableExtraFractions : Boolean

code == Common Tool Talk - doFeedback commands  ^  == code format="actionscript"

All tools have a ** .toolTalk.doFeedback ** routine defined, which will manipulate a tool to bring it into a representation of the expression requested, up to the feedback step specified. code getFeedbackLevel requires 4 parameters: code format="actionscript"

code op Operation to be modelled. "x" code format="actionscript"

code num1 First number in operation (Number) code format="actionscript"

code num2 Second number in operation (Fraction) code format="actionscript"

code initObj An object that contains parameters (some optional) to customize how the animation is performed code format="actionscript"

code

code format="actionscript"

code type: String - command that corresponds to animation action desired code format="actionscript"

code

code format="actionscript"

code clear: Boolean - whether or not to clear the contents of the tool before performing the animation (if false, then deal with what's already there) code format="actionscript"

code

code format="actionscript"

code animationType: String - used to control speed or style of animation ("slow", "normal", "fast", "instant" ) code format="actionscript"

code

code format="actionscript"

code thisTypeOnly:Boolean - whether or not to do all actions leading up to requested command. (Default : FALSE - ie - always do animations that build to final command. If TRUE, then only do this specific animation based on command, irregardless of actual status of tool. Warning - this could have dangerous side effects, or, lead the tool to show misleading or incorrect models of an operation code format="actionscript"

code

code format="actionscript"

code Hops - highlight input fraction || Hops - gather units at front of number line || code format="actionscript"
 * ~ Feedback command ||~ Description of Feedback ||~ Example of Action ||
 * < PointAtStartingPoint ||< Point at designer spot || Fr Strips - highlight fraction strip values to be used
 * SetDesign || set designer to a value || Set the input fraction to the correct value ||
 * < FlashExtras ||< flash incorrect pieces || Highlight and flash the extra bits on the stage that represent incorrect unwanted fractions ||
 * < Delete Extras ||< delete incorrect pieces || Delete those extra unwanted bits ||
 * < FlashDesign ||< flash insert thing || Flash the proper design fraction, or builder, or insert button ||
 * < NextStepOfBuild ||< put one on / insert 1 || Drag one copy of the designed square / strip / hop onto the tool ||
 * < Build ||< build all || Finish the building of the model (usually as separate pieces) ||
 * < Complete ||< complete (or simplify the model) || Collect the parts of the model together (Fr Strip - in a single strip ) ||
 * < CollectWholes ||< separate wholes || Fr Strip - separate the wholes from the partial fractions (only appropriate for mixed number examples)

code code format="actionscript" myTool. toolTalk. doFeedback ( "x", 3 , new Fraction ( 2 , 3 ) , { type : "Complete" , clear : true , animationType: "fast" } ) ;

operator : String ("x") num1 : Number ( 3 ) num2 : Fraction initObject : Object (determines how the feedback animation is processed) initObject.type : String (the specific Feedback command as entered in the table above - one word using CamelCase) initObject.clear : Boolean (if TRUE, then clear the model completely and start from scratch, if FALSE, work with what's there and adjust as needed) initObject.animationType : String (how the animation is to happen. "slow", "fast", "normal", "instant" ... and in the future perhaps "playerAutoPlay", "playerSetup" ) initObject.thisTypeOnly:Boolean - whether or not to do all actions leading up to requested command. (Default : FALSE - ie - always do animations that build to final command. If TRUE, then only do this specific animation based on command, irregardless of actual status of tool. Warning - this could have dangerous side effects, or, lead the tool to show misleading or incorrect models of an operation
 * doFeedback ** takes 4 input parameters

code

code format="actionscript"

code == Extra info available about state of tools  ^  ==

code format="actionscript" See list of Object that is returned from getFeedbackLevel

Some tools give additional information, but the standard getFeedbackLevel object contains the following code code format="actionscript" var currFeedback : Object = myTool. toolTalk. getFeedbackLevel ( "x", 3 , new Fraction ( 2 , 3 ) ) ;

// currFeedback.level = level number // currFeedback.compResult = comparison object used to compare the current tool to the desired tool's contents // currFeedback.compOrderlessResult = object resulting from orderless match // currFeedback.numInMatching // currFeedback.numInMissing // currFeedback.numInExtra // currFeedback.onlyAcceptableExtraFractions : Boolean

code