Lecture overview -- Keyboard shortcut: 'u'  Previous page: Interfaces to clients and subclasses -- Keyboard shortcut: 'p'  Next page: Class hierarchies and Inheritance -- 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 16 : 40
Object-oriented Programming in C#
Specialization, Extension, and Inheritance
Visibility and Inheritance

In most object-oriented programming languages it is possible to control the visibility of data and operations in relation to subclasses

  • Common visibility distinctions:

    • Private

      • Visibility limited to the class itself.

      • Instances of a given class can see each others private data and operations

    • Protected

      • Visibility is limited to the class itself and to its subclasses

    • Public

      • No visibility limitations