Ralph Johnsons Exercises
Last updated at 8:12 pm UTC on 21 March 2004
I have many exercises I use when I teach Smalltalk. They start out easy and get harder. These were all developed with VisualWorks. Though none of them have any GUI, they likely contain a few incompatibilities with Squeak. Let me know when you find them and I'll correct them.
Military Rank (http://st-www.cs.uiuc.edu/users/johnson/cs497/military.html) A simple lesson in writing a concrete subclass of an abstract class. The abstract class in this case is Magnitude.
Money (http://st-www.cs.uiuc.edu/users/johnson/cs497/Money.html) Gives practice for double dispatching (well, it does in VisualWorks, but not in Squeak) and seeing how Numbers are implemented.
Peano Numbers builds upon your knowledge of Numbers to explore the power of polymorphism.
The Collection Homework (http://st-www.cs.uiuc.edu/users/johnson/cs497/collection.html) Gives practice with collections, which is important for any Smalltalker.
Fun with streams starts easy and gets hard! Teaches streams and component programming. And shows that some components can be used in non-obvious ways.
More to come.