Object-Oriented Software Development, CS 427
Object-oriented (OO) programming shifts the emphasis from step-by-step procedures (algorithms) to the objects on which the steps were supposed to act. For example, instead of code that has step-by-step skiing instructions, an OO program will create a self-contained block of code that is the skier, another block that is a ski, and another block that is the snow. The blocks (or objects) then interact by sending messages to each other and reacting to those messages. (Skier Object: “Yo Mr. Ski Object, that’s a Tree Object, so turn right.” Ski Object: “Sorry, no can do. Fall down now! My Binding Object is broken!”) We’ll explore inheritance, polymorphism and other concepts that enhance our ability to write self-contained replaceable objects. For example, in the previous example, it might be nice to replace the ski with a more reliable snowboard. In OO programming, this becomes very easy. Unlike traditional procedural code, we’ll learn to write simple objects that are easily modified, updated, extended, or replaced. Our objects will also be flexible, responding to different situations by simply sending different messages – no need to rewrite the entire program to handle new situations. (Skier Object: “Umm, wait. That’s not a Tree Object. Good grief, it’s a Jump Object! Jump Mr. Ski Object, jump!")
Javadoc: Writing Comments For Your Code
Class Notes Part 2 (Java Review)
Class Notes Part 3 (Class Constructors, Attributes)
Class Notes Part 4 (Inner Classes, Packages, Static)
Class Notes Part 5 (Encapsulation, Setters and Getters)
Class Notes Part 6 (Inheritance)
Class Notes Part 7 (Polymorphism)
Class Notes Part 8 (Casting and Dynamic Binding)
Class Notes Part 9 (Exceptions)
Class Notes Part 10 (Abstract Classes and Interfaces)