Functions of classes

< Class

A 'Class' has two functions.

1. Intent of the class: On the one hand, the class will be the template or a model for a group of real world objects that are similar. It defines a type of instances and therefore we also call it an object type. This is called the "intent" of the class; it is the definition of the concept that defines class membership In our example a person is a student only if that person is subscribed for at least one study program at the KU Leuven. The template will capture characteristics that are relevant about the objects in the class In the case of students at the university, their name, their birthdate, their home address, their email address, ... are examples of features that are relevant for the concept of the student in the context of the university. The class definition will omit the irrelevant aspects. Irrelevant characteristics of students from the perspective of the university are: the color of their hair, the color of their eyes, their height, their weight ...

2. Extent of the class: At the same time, the class represents a collection of objects that conform to its intent. This is called the 'extent' of the class.