Lecture overview -- Keyboard shortcut: 'u'  Previous page: Visibility - the Iceberg Analogy -- Keyboard shortcut: 'p'  Next page: Program modification - the Fire Analogy -- 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 : 29
Object-oriented Programming in C#
Classes and Objects
Visible and Hidden aspects

Only the name of the class and the headers (signatures) of some selected operations are visible to client classes. The data (variables) of the class should always be private.

Which aspects of a class are hidden, and which aspects are visible from outside the class?

  • Visible aspects

    • The name of the class

    • The signatures of selected operations: The interface of the class

  • Hidden aspects

    • The representation of data

    • The bodies of operations

    • Operations that solely serve as helpers of other operations

/user/normark/oop-csharp-1/sources/c-sharp/Die-variants/die-0-0/die.csThe class Die - aspects visible to clients emphasized.

On this illustration, the purple aspects correspond to the tip of the iceberg. Please take a careful look at it and be sure to understand the analogy.

Read more about visibility in the text book version of this material.