AP Computer Science Workshop
Structured vs. Object-Based Programming
- Object-Oriented (actually object-based) vs Structured Programming
- Different Rhetorical Styles (i.e., different programming paradigms)
- Structured Program = Data + Abstraction (Wirth, I think?)
- Object-Oriented = Objects + Classes + Inheritance (Wegner) + Polymorphism
encapsulation + user-defined types and instantiation + inheritance + dynamic binding
- Metaphor is interacting independent entities passing messages & making requests, rather than hierarchical delegation of subtasks.
- Some Possible Ways to Order the A Curriculum
- Objects First, Objects Early, Objects Late
- Objects First:
- Introduce objects, types (classes), and operations on types. Concentrate on using operations on objects first.
- Introduce class declarations as interfaces/specifications to know what operations are available for a given type.
- Introduce operation (member function) implementation: cover statements, expressions, parameter passing, and everything else that leads up to functions. Cover private data members as well as local variables.
- Use objects and classes as you concentrate on problem-solving. (OOD)
- Go on to arrays, file i/o, etc.
- Objects Early:
- Cover statements, expressions, parameter passing, and everything else that leads up to functions.
- Introduce objects and classes. Operations on objects are functions (member functions).
- Use objects and classes as you concentrate on problem-solving. (OOD)
- Go on to arrays, file i/o, etc.
- Objects Late:
Do what you've been doing, but add objects and classes somewhere before the end of the A curriculum
Alyce Brady, Kalamazoo College