Teaching OOP (C++) outside-in vs inside-out approach -


i running programming club @ high-school, , have introduced students oop using simplistic classes in c++. believe @ least theoretically idea. able offer them specific project can work on together. question have approach take. when took programming classes in college, saw 2 different approaches, in opinion both had serious shortcomings. ended sleeping through of them , learning stuff on own books , examples. in teacher's shoes, opinion on approach preferable or if there third option.

approach 1 used, write program on board (or on computer projection screen). class definitions written first. students bewildered @ point, because purpose of variables , methods seem entirely obscure them. time learned each variable , method , how interacted when instructor write implementation (i called outside-in method)

approach 2 explain trying achieve, , creating classes , members needed. has opposite problem. writing method use these imaginary classes have implemented later. students has no idea how these other classes work.

as happens, worked way through university working teacher. software engineer.

in experience, paramount students emotionally invested in programming project. i'll question in minute, necessary preamble.

to there, made topic of program interested them, regardless of how silly seemed, long connected them in world.

so, (depending on age of students) ranking singing stars talent level, including justin bieber. can imagine uproar @ one.

like, load lyrics , count number of times word "baby". creative, fun.

this make "dry" questions come alive. like, should "singer" class like. why should have properties "octave range" intuitive.

should singer class have method called 'barfonstage'? (the biebs barfed on stage while ago). sure, why not!? see difference between methods , properties.

i mean, i'm talking off top of head, i'm sure can apply own inventiveness , creativity whatever's appropriate kids.

i love hear went with, , how kids' project turned out.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -