algotutor tutorial (3) program pad

29
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).

Upload: eryk

Post on 08-Jan-2016

29 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: AlgoTutor Tutorial (3) Program Pad

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

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

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

How to use ProgramPad (for a new problem)

Step 1: Start with an

AlgoTutor problem exercise

Page 5: AlgoTutor Tutorial (3) Program Pad

How to use ProgramPad (for a new problem)

Step 2: Solve the AlgoTutor problem

Page 6: AlgoTutor Tutorial (3) Program Pad

How to use ProgramPad (after you have developed an algorithm)

Select a ProgramPad

exercise

Page 7: AlgoTutor Tutorial (3) Program Pad

How to use ProgramPad (after you have developed an algorithm)

Click “Solve” !

Page 8: AlgoTutor Tutorial (3) Program Pad

You can now see your algorithm turned into C++ code!!

Page 9: AlgoTutor Tutorial (3) Program Pad

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

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

The C++ code corresponding to your algorithm is in this pane

Page 12: AlgoTutor Tutorial (3) Program Pad

This pane contains the statements that need to be at the beginning of a

C++ program

Page 13: AlgoTutor Tutorial (3) Program Pad

Your program variables are in this pane

Page 14: AlgoTutor Tutorial (3) Program Pad

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

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

If your C++ syntax

is correct, then you will see this

notice.

Page 17: AlgoTutor Tutorial (3) Program Pad

Now you can select the data to run you

program with, or use your input

Page 18: AlgoTutor Tutorial (3) Program Pad

Now click the Run buttonto execute

your program

Page 19: AlgoTutor Tutorial (3) Program Pad

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

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

After clicking Save, Buildand Run, the new results

are better.

Page 22: AlgoTutor Tutorial (3) Program Pad

You want to test with your own input values?

Page 23: AlgoTutor Tutorial (3) Program Pad

You want to print code ?

Page 24: AlgoTutor Tutorial (3) Program Pad

Click “Print” !

Page 25: AlgoTutor Tutorial (3) Program Pad

If you do not see a new pop

window, click here to minimize

this window

Page 26: AlgoTutor Tutorial (3) Program Pad

OrClick here on the

task bar

Page 27: AlgoTutor Tutorial (3) Program Pad

Click here to print!

Pop-up window for printing your code

Page 28: AlgoTutor Tutorial (3) Program Pad

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

You have now successfully completed a ProgramPad exercise!