Lecture overview -- Keyboard shortcut: 'u'  Previous page: Responsibilities -- Keyboard shortcut: 'p'  Next page: Abstract Datatypes -- 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 9 : 22
Object-oriented Programming in C#
Introduction to Object-oriented Programming
Data-centered modularity

In large program, modularity becomes a very important quality.

Modularity is the property of a computer program that measures the extent to which it has been composed out of separate parts called modules [Wikipedia]

  • Procedural modularity

    • Made up of individual procedures or functions

    • Relatively fine grained

    • Not sufficient for programming in the large

We distinguish between three different kinds of modularity.

Procedural modularity is important in structure programming.

Data-centered modularity is the thing to watch in object-oriented programming.

  • Boxing modularity

    • A wall around arbitrary definitions

    • As coarse grained as needed

    • Visibility may be controlled - import and export

  • Data-centered modularity

    • A module built around data that represents a single concept

    • High degree of cohesion

    • Visibility may be controlled

    • The module may act as a datatype

Object-oriented programming is based on data-centered modularity