algotutor tutorial (3) program pad
DESCRIPTION
AlgoTutor Tutorial (3) Program Pad. J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong MTSU Computer Science Department. Making the transition from the algorithm to the implementation (C++ code). What is ProgramPad ?. ProgramPad is a component of the AlgoTutor system - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/1.jpg)
AlgoTutor Tutorial (3)
Program Pad
J. Yoo, S. Yoo, C. Pettey, S. Seo, and Z. Dong
MTSU Computer Science Department
Making the transition from the algorithm to the implementation (C++ code).
![Page 2: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/2.jpg)
What is ProgramPad ?
• ProgramPad is a component of the AlgoTutor system
• It converts your algorithm developed in Composer of AlgoTutor into C++ code.
• To use the ProgramPad, you need to first develop an algorithm for a given problem.
![Page 3: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/3.jpg)
How to use ProgramPad
For a new problem 1. Start with an AlgoTutor problem
exercise2. Solve the AlgoTutor problem3. Select the Corresponding
ProgramPad exercise
For a problem for which you have already developed an algorithm
1. Simply select a ProgramPad exercise
![Page 4: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/4.jpg)
How to use ProgramPad (for a new problem)
Step 1: Start with an
AlgoTutor problem exercise
![Page 5: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/5.jpg)
How to use ProgramPad (for a new problem)
Step 2: Solve the AlgoTutor problem
![Page 6: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/6.jpg)
How to use ProgramPad (after you have developed an algorithm)
Select a ProgramPad
exercise
![Page 7: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/7.jpg)
How to use ProgramPad (after you have developed an algorithm)
Click “Solve” !
![Page 8: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/8.jpg)
You can now see your algorithm turned into C++ code!!
![Page 9: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/9.jpg)
January 13, 3:35 PM
The first time you use ProgramPad for a problem you will need to load your algorithm
![Page 10: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/10.jpg)
January 13, 3:35 PM
To load your algorithm, (1)click the drop down arrow (2) select your algorithm (AlgoTutor
solution), then (3) click the load button
![Page 11: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/11.jpg)
The C++ code corresponding to your algorithm is in this pane
![Page 12: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/12.jpg)
This pane contains the statements that need to be at the beginning of a
C++ program
![Page 13: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/13.jpg)
Your program variables are in this pane
![Page 14: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/14.jpg)
Your algorithm does not contain C++ syntax, so you
may need to add some things. For instance, this one is
missing variable declarations
![Page 15: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/15.jpg)
After typing the appropriate C++ code in this pane, you need to click
The Save button. Then you can compile your program by clicking
the Build button.
![Page 16: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/16.jpg)
If your C++ syntax
is correct, then you will see this
notice.
![Page 17: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/17.jpg)
Now you can select the data to run you
program with, or use your input
![Page 18: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/18.jpg)
Now click the Run buttonto execute
your program
![Page 19: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/19.jpg)
The results of your run will show up in a popup window.Notice any errors,then click close.
![Page 20: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/20.jpg)
In the preceding run, the spacing was off and
there was no purpose printed. So the solution can be altered by typing
in the solution pane
![Page 21: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/21.jpg)
After clicking Save, Buildand Run, the new results
are better.
![Page 22: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/22.jpg)
You want to test with your own input values?
![Page 23: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/23.jpg)
You want to print code ?
![Page 24: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/24.jpg)
Click “Print” !
![Page 25: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/25.jpg)
If you do not see a new pop
window, click here to minimize
this window
![Page 26: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/26.jpg)
OrClick here on the
task bar
![Page 27: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/27.jpg)
Click here to print!
Pop-up window for printing your code
![Page 28: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/28.jpg)
You are all done, so don’t forgetto click the Done
button.Make sure you print before
You click done.
![Page 29: AlgoTutor Tutorial (3) Program Pad](https://reader030.vdocuments.site/reader030/viewer/2022033103/56813f86550346895daa759d/html5/thumbnails/29.jpg)
You have now successfully completed a ProgramPad exercise!