(no title)
DZittersteyn | 12 years ago
If you take an OO programming language as your teaching language, you need to introduce a number of concepts first.
Hr 1: Talk about classes and objects. Introduce the Car and Bike object, that both have the method 'steer()', the attribute 'wheels' and only the car has the property 'hood'. Introduce return types here, as well as arrays.
Hr 2: Then explain how the 'color' on Car is public, while you'd like the accelerate() method to be private.
Hr 3: Explain how some methods and attributes are static. what is a property of the concept 'Car' and what is an attribute of an instance?
In Hr 4 you introduce them to the classes String and System.
Your students will now know:
-class -public -static -void -String[]
You can now tell them about the 'magic' that makes things start, the 'main' method.
Class MyFirstProgram { public static void main(String[] args) { System.out.println("Hello World"); } }
No magic, and a nice start to becoming a proper OO-programmer.
If you want too teach them FP, Haskell is not a bad way to go. If you want to teach them OO, Java isn't as crappy as people say it is.
No comments yet.