Lecture overview -- Keyboard shortcut: 'u'  Previous page: Client, Servers, and Messages -- Keyboard shortcut: 'p'  Next page: Data-centered modularity -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 8 : 22
Object-oriented Programming in C#
Introduction to Object-oriented Programming
Responsibilities

Responsibilities go hand in hand with contracts. Contracts are covered in the very end of this teaching material.

Objects that act as servers manage a certain amount of responsibility
Objects that manage too many responsibilities tend to be too complex. It is almost always better to distribute the responsibility on several "smaller objects". - The same is actually true for operations.

  • Responsibility

    • Of an object, as reflected by the interface it provides to other objects

    • Of an operation

      • Precondition for activation - proposition about prerequisites for calling

      • Postcondition - proposition about result or effects

    • Well-defined responsibilities provide for coherent objects

Preconditions and postconditions is an important topic in the lecture about Contracts and Assertions. See here.

You should care about the responsibilities of both objects and operations

The distribution of responsibilities will become a major theme later in the course