Topic: object-oriented classes

topics > computer science > programming > Group: object-oriented programming

data structures
derived data types
program module
type inheritance

abstract data type
abstract functions
abstraction in programming
data type as a set of values and a set of operations
data type as constructors, selectors, and predicates
program module as encapsulation
import/export lists for defining an interface
interface between program modules
interface type
non-hierarchical classification and multiple classification
object-oriented data types
object-oriented design
object-oriented fields
object-oriented packages
object-oriented prototypes
parameter passing by message
self-identifying data structures
types of object-oriented classes


A class in object-oriented programming defines the set of messages recognized by its instances. This set is called its protocol. It inherits variables and procedures from its place in the type hierarchy.

A class is itself an object. In Simula, it generalized the notion of a block in Algol by defining local storage that persists. (cbb 1/90)

Subtopic: class as data type up

Quote: a Simula class combines a structured data type with its operations; e.g. Dahl and Hoare's paper [»brinP_1973]
Quote: classes are a remodeling of records; hierarchical tree structure; members are objects; the prefix of a subclass is the higher level class [»dahlOJ_1967]
Quote: a C++ class is a user-defined type; it provides data hiding, initialization, type conversion, dynamic typing, memory management, and overloaded operations [»stroB_1991]
Quote: the type of an object is its external interface, while the class of an object is its implementation
Quote: a class is a type: it specifies how objects behave and how they are created, used, and destroyed. A class also specifies a representation [»stroB_1991]
Quote: a C++ class defines the type of members that represent an object, operations that manipulate objects, and access rights [»stroB_1994]
Quote: each object includes knowledge of its class [»shocJF9_1979]
Quote: objects may have the same form, i.e., belong to the same class [»madsOL10_1986]
Quote: control an operation by membership in a named set (its class) [»buxtJN_1962, OK]
Quote: is class (i.e., type + extent) a parameterized data type like 'array of int'? [»buneP5_1986]
QuoteRef: goldA3_1976 ;;19 Class definition dictionary are typically nested (for scoping)
Note: a type Turing machine selects transition table by type; allows decomposition [»cbb_1990, OK]

Subtopic: class as behavior up

Quote: data and operations are the warp and weft of experience; state and process descriptions; e.g., integer and boolean have identical bit strings [»brinP_1973]
Quote: classes (i.e., data abstractions) define the behavior of objects in an object-oriented database; can change implementation without changing use classes which use the method [»smitKE10_1987]
Quote: to define a class need to define a complete set of operations. This is an important shift of emphasis from defining a data structure; lots of benefits [»stroB_1991]
Quote: classes represent objects in the problem/solution space with a set of responsibilities that are implemented through attributes and operations [»boocG_1999]

Subtopic: class as concept up

Quote: the concept-oriented view of inheritance is based on classification in taxonomic systems; models part of the real world [»winkJF8_1992]
Quote: in conceptual modeling, each object is an instance of at least one class [»borgA1_1985]
Quote: represent a separate idea as a class; a separate entity as an object; commonality between classes as a base class; and a container of objects as a template
Quote: the purpose of classes in C++ is to help with thinking about, designing, and organizing programs in terms of the concepts of your application [»stroB_1996]
Quote: a record class is all records with the same field names and types; correspond to their natural classification; e.g., person or town [»wirtN6_1966]
Quote: a program is a concrete representation of the ideas in a problem solution. Its structure should match the ideas [»stroB_1991]
Quote: object-oriented classes either reflect the concepts of an application domain or they are artifacts of the implementation [»stroB_1991]
Quote: a good design models some aspect of reality. Concepts are classes with inheritance to show relationships. Multiple levels of abstraction [»stroB_1991]
Quote: use classes to model abstractions from the problem or solution space [»boocG_1999]

Subtopic: class as model up

Quote: objects are things drawn from the problem/solution space; a class describes a set of common objects [»boocG_1999]
Quote: objects in computer languages should match natural mechanisms for storing and using real world knowledge [»liebH11_1986]

Subtopic: class as language up

Quote: classes define the vocabulary for describing a system
Quote: language should classify objects and allow addition of new classes on equal footing with kernel classes [»ingaDH8_1981a]

Subtopic: class as protocol up

Quote: in Smalltalk, every object has a class; semantics by the messages handled by a class [»smitDC6_1975, OK]
Quote: Kevo objects are in the same family if they share the same external interface; automatically maintained [»taivA11_1997]
Quote: the external view of an object is its protocol, i.e., the set of messages that it responds to [»robsD8_1981]
Quote: Smalltalk message invokes a method according to the receiver's class
Quote: methods can only send messages to objects, they can not call methods directly; implements strong typing [»robsD8_1981]
Quote: in Simula, fishdeath.cause.countermeasure.cost yields a value according to class methods [»palmJ5_1973, OK]
Quote: an Eiffel class exports externally visible features; all other features are internal [»meyeB9_1990]
Quote: it is much easier to add a function that is clearly needed for a class than to remove a function that has become a liability [»stroB_1991]

Subtopic: virtual class up

Quote: a class may define virtual quantities for access from a super class; like call-by-name; compiler could check virtual specification [»dahlOJ_1967]

Subtopic: class as invariant up

Quote: basic-guarantee of exception-safety -- invariants preserved and no resource leaks
Quote: a class maintains an invariant, i.e., a piece of code that checks the state of an object
Quote: in a well-defined class, an initialized object satisfies a simple invariant that is maintained by all operations until the object is destroyed
Quote: check routines for class invariants are an invaluable help during debugging and class definition [»stroB_1991]
Quote: a class' representation invariant captures its assumptions about what state variables mean and how they can change
Quote: each class and routine in an Eiffel library is formally specified with preconditions, postconditions, and invariants [»meyeB9_1990]
Quote: a redefined Eiffel feature must include an equal or weaker precondition and an equal or stronger postcondition; satisfies contract [»meyeB9_1990]
Quote: a deferred Eiffel class specifies an object's behavior with assertions but does not provide a full implementation [»meyeB9_1990]
Quote: class invariants specify the conventions for borderline cases, initial states, etc.; e.g., can position a CHAIN object before the start [»meyeB9_1990]
Quote: use private and protected functions whenever an object does not satisfy the class invariant [»stroB_1991]
Quote: a class' abstraction relation gives the correspondence between its internal state and its intended conceptual value; e.g., does a stack grow up or down [»edwaSH2_1997]

Subtopic: class vs. interface up

Quote: class-based APIs are easier to modify than interface-based APIs; can add members to classes as needed [»cwalK_2006]
Quote: use abstract classes to decouple contract from implementation; use interfaces to define invariant contracts [»cwalK_2006]

Subtopic: polymorphism -- same name in multiple classes up

Quote: dynamic selection of a procedure according to class of object [»palmJ5_1973, OK]
Quote: Eiffel uses consistent names across classes; e.g., use 'add' instead of 'push' for STACK [»meyeB9_1990]
Quote: in the message/object model, objects have a class which implements such operations as 'compare'; a sort operation could use this for any type [»coxBJ7_1983]
Quote: Simscript allows the same operation name applied to different entities [»simscrip_1971, OK]

Subtopic: object-oriented database as classes up

Quote: while a relational database has one type; each object in an object-oriented database is assigned a class [»smitKE10_1987]

Subtopic: class members up

Quote: order class members by field, constructors, properties, methods, events, implementation, private members, and nested types [»cwalK_2006]

Subtopic: constructor up

Quote: allow default constructor plus property setters in place of a parameterized constructor [»cwalK_2006]

Subtopic: class loader up

Quote: class loaders in Java locate an implementation for a class by its textual name; e.g., locate a handler for a new MIME type by its name [»goslJ6_1997]
Quote: class loaders--lazy loading, type-safe linkage, multiple namespaces, user extensibility [»lianS10_1998]

Subtopic: class documentation up

Quote: Eiffel's 'short' command documents a class by extracting parameters, documentation, pre- and post-conditions [»meyeB10_1992]

Subtopic: sub-class up

Quote: a nested, member class should be static; it has access to all of the enclosing class's members [»blocJ_2001]

Subtopic: limitations of classes up

Quote: object-oriented definitions can not handle natural kinds (i.e., primitive notions); natural kinds are not completely defined by a set of operations and attributes [»wegnP10_1986]
Quote: basic classes occur in the middle of the class hierarchy but object-oriented class design proceeds from top to bottom [»taivA11_1997]
Quote: C++ types and data-hiding efficiently prevent accidental corruption of data. They do not provide secrecy and security [»stroB_1991]
Quote: since concepts are timeless, a class, a model of a concept, should not have a current state [»madsOL10_1986]
Quote: only refer to an object's class when creating it; use interfaces elsewhere [»blocJ_2001]

Related Topics up

Group: data structures   (12 topics, 278 quotes)
Group: derived data types   (9 topics, 119 quotes)
Group: program module   (10 topics, 336 quotes)
Group: type inheritance   (13 topics, 394 quotes)

Topic: abstract data type (64 items)
Topic: abstract functions (11 items)
Topic: abstraction in programming (67 items)
Topic: classification (65 items)
Topic: data type as a set of values and a set of operations (16 items)
Topic: data type as constructors, selectors, and predicates (20 items)
Topic: program module as encapsulation (28 items)
Topic: import/export lists for defining an interface (20 items)
Topic: interface between program modules (55 items)
Topic: interface type (50 items)
Topic: non-hierarchical classification and multiple classification (16 items)
Topic: object-oriented data types (29 items)
Topic: object-oriented design (30 items)
Topic: object-oriented fields (28 items)
Topic: object-oriented packages (6 items)
Topic: object-oriented prototypes (39 items)
Topic: parameter passing by message (31 items)
Topic: self-identifying data structures (18 items)
Topic: taxonomy (16 items)
Topic: types of object-oriented classes
(18 items)

Updated barberCB 9/04
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.