15.01.2013 Views

Education in Programming David Gries Dr. rer ... - Cornell University

Education in Programming David Gries Dr. rer ... - Cornell University

Education in Programming David Gries Dr. rer ... - Cornell University

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

How to teach programm<strong>in</strong>g, us<strong>in</strong>g Java<br />

an objected-oriented language<br />

Algorithmic aspects<br />

Pr<strong>in</strong>cipals: Emphasize correctness concerns<br />

Give a good model of execution<br />

Teach programm<strong>in</strong>g, not programs<br />

m: 0<br />

p1 p2<br />

1. Deeper <strong>in</strong>vestigation <strong>in</strong>to procedures/functions<br />

2. If-statements, local variables<br />

3. Model of execution, <strong>in</strong>clud<strong>in</strong>g a frame for a call<br />

4. Stepwise ref<strong>in</strong>ement<br />

5. Recursion. Emphasize difference between the model of execution<br />

and understand<strong>in</strong>g a recursive function (proof of correctness)<br />

6. Loops: taught <strong>in</strong> terms of loop <strong>in</strong>variants, right from the beg<strong>in</strong>n<strong>in</strong>g<br />

12<br />

t1<br />

frame for call of function m with<br />

pars p1, p2 and local var t1<br />

12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!