Skip to main content

Object-Oriented Vocabulary: An Introduction

Printer-friendly version
Instantiation: The process of creating a specific instance of an object.

Interface: A Class which defines a Contract in abstract terms so that this Contract can be Implemented by multiple Classes. This provides a uniform component to the Contract of all Classes which Implement the Interface. Any Class Implementing an Interface can be substituted for any other Class Implementing that Interface wherever a parameter is defined as being the type of the Interface rather than some concrete Class.

Invariants: A fundamental characteristic that is unlikely to change in the context. “Context” can refer to the problem space, e.g., normal requirements changes, or a broad class of similar subject matters, e.g., all GUI displays all use the same basic mechanisms regardless of the semantics of what is displayed. Extracting invariants is just another form of abstraction; one strives to find a level of abstraction where the details no longer matter.9

Leaf Class: In a Generalization hierarchy, one of the terminal nodes, i.e., the Subclass which will actually be Instantiated in the running system. It is generally considered poor design to instantiate a Superclass, although the type of the Superclass may be specified as the type of a parameter when any of the Subclasses can be supplied.

Member: An element of a Class definition which defines a knowledge or behavior Responsibility. Knowledge Members are variables and properties. Behavior Members are Methods and Events.

Message: In the context of modeling, a communication from a Class that identifies some state or event. In code, this modeling message manifests itself as a Member of the Class, i.e. Methods, Properties, and Events. I.e., in coding, Messages are essentially the reverse of their intent in modeling. In modeling, the object is communicating something about itself to whomever might be interested, but in code many Messages become instructions to do something. When speaking of Objects, a Message is often more loosely interpreted to be a communication of knowledge or instructions between two Objects, which is closer to the modeling intent.

Method: The implementation of a single unit of behavior Responsibility in a Class. A Method is similar to an Internal Procedure in non-OO programming except that it may have a return value, has more features, and its signature is checked against calls at compile time.

Multiplicity: In a Relationship between two Classes, the count of the number of each type of Class which may be at the end of the Relationship. While any number is possible, most multiplicities are stated in terms of 0 (no instances), 1 (exactly one instance), and * (many instances). Often, a range is specified using two dots, e.g., 0..1 (no instances or one instance, an optional Relationship), 1..* (one or more instances). Both ends of a Relationship have their own Multiplicity. E.g., the Relationship between Car and Owner would be 0..* on the Car end since one Owner can own no cars or many cars and either 1..* or 0..* on the Owner end depending on whether the context allowed for a Car to have no Owners.

AttachmentSize
OOVocabulary_20100116.pdf75.84 KB