Classes and Objects
Classes and Objects
- A class is a set of objects that share a common structure and common behavior
- Every object is an instance of some class
- Common structure is represented by attributes (properties)
- Common behavior is represented by operations
- An object is a concrete entity that exists in time and space
- a class is merely an abstraction
- Classes are usually static
- their existence, semantics, and relationships are defined before program execution
- Objects are dynamic
- they can be created and destroyed during program execution