AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor
description
Transcript of AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor
![Page 1: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/1.jpg)
AlgoTutor Tutorial (4)
Using the Virtual Machine Component of AlgoTutor
J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong
MTSU Computer Science Department
![Page 2: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/2.jpg)
What is the Virtual Machine?
• The Virtual Machine is a component of the AlgoTutor System
• It allows you to visualize the flow of data through an algorithm
• To use the Virtual Machine, you need to first develop an algorithm for a given problem
• The Virtual Machine is only available for certain problems
![Page 3: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/3.jpg)
How to use the Virtual Machine
• Start with an AlgoTutor problem exercise that has been created for the Virtual Machine.
• Solve the AlgoTutor problem (hint: the ordering and mapping phases are combined into one phase)– Drag Operations into the appropriate order– Click “compare my ordering w/ teacher’s” if you really need help but your grade is penalized if you do this too many times. Also, this only checks the ordering. It does not check the mapping.
– Click the variables tab to do the mapping
• Click “save changes”
![Page 4: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/4.jpg)
How to use the Virtual Machine (continued)• Before clicking “Submit for grading” use the Virtual Machine to “trace” the flow of your algorithm– Use drop down arrows to select input– Click Trace execution (if the tracer window doesn’t show up check to see if you need to enable popups)
– Click Execute next step to see the result of each step
• Click “execute w/ selected” to see what would be output by the algorithm with the selected input
• Click “execute w/ all” to see the grade for your algorithm
• Click “Submit for grading” when you are happy with your grade
![Page 5: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/5.jpg)
Select a lab
![Page 6: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/6.jpg)
Select an Exercise that has been created for the Virtual Machine
![Page 7: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/7.jpg)
Clickthe
Solvebutton
Notice the operationsphase and the mapping phaseare merged into
one phase
![Page 8: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/8.jpg)
Begin as you would any other AlgoTutor problem
by draggingoperations from the right to the
left.
![Page 9: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/9.jpg)
You can click the Compare my ordering w/ teacher’s button if you need help. Butdon’t click too many times or it will hurtyour grade. Also, only your ordering
will be compared. The mapping is not checked.
![Page 10: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/10.jpg)
It does warn you howmany free checks youhave left before your
grade is hurt!!
![Page 11: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/11.jpg)
When you are comfortablewith your ordering you
can do the mapping andthen use the tracer tocheck the mapping
![Page 12: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/12.jpg)
There is no separatemapping phase.
You must click the Variables tab
to see the variables
![Page 13: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/13.jpg)
Be sure to click thesave changesbutton before
using the virtual machinealgorithm tracer
![Page 14: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/14.jpg)
![Page 15: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/15.jpg)
Now you are ready totrace your algorithm.Begin by selectingyour input values.
![Page 16: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/16.jpg)
Then click the Trace execution
button.If the tracer window
doesn’t show up,make sure you have
enabled popups.
![Page 17: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/17.jpg)
Click the Execute the next step
button to seeeach step of your
algorithm
![Page 18: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/18.jpg)
Valuesfor
variablesshow up
here
![Page 19: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/19.jpg)
algorithm output is here
![Page 20: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/20.jpg)
You can also just see whatwould be output by youralgorithm by selecting
input and thenclicking the
Execute w/ selectedbutton
![Page 21: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/21.jpg)
![Page 22: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/22.jpg)
Or you can click theExecute w/ allbutton to see
what your gradewould be
![Page 23: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/23.jpg)
Note: Execute All takesa few seconds
to complete
![Page 24: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/24.jpg)
![Page 25: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/25.jpg)
Only when you are satisfied shouldyou click the
Submit for gradingbutton. You cannot goback and redo anything
once that button isclicked
![Page 26: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/26.jpg)
You can changeyour mind about
submittingby clicking
Cancel
![Page 27: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/27.jpg)
![Page 28: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/28.jpg)
ClickView Solution
to seethe finishedalgorithm
![Page 29: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/29.jpg)
![Page 30: AlgoTutor Tutorial (4) Using the Virtual Machine Component of AlgoTutor](https://reader036.fdocuments.us/reader036/viewer/2022062422/568140be550346895dac8262/html5/thumbnails/30.jpg)
Now you can do the next exercise in the
lab!!!