Lecture overview -- Keyboard shortcut: 'u'  Previous page: Constant and readonly variables -- Keyboard shortcut: 'p'  Next page: The current object - this -- 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 19 : 29
Object-oriented Programming in C#
Classes and Objects
Objects and Classes

You are supposed to know the difference between a class and an object. This difference is explained on this page.

Classes are written and described in source programs

Objects are created and exist while programs are running

  • Objects are characterized by

    • Identity

    • State

    • Behavior

All objects cease to exist when the program execution terminates.

This is in conflict with the behavior of corresponding real-life phenomena, and it causes a lot of problems and challenges in many programs

Read more about classes vs. objects in the text book version of this material.