Skip to main content

17.3) Classes In A Programming Language


Objects and classes can be identified in any real-world problem that we might wish to model or investigate using software.

Object-oriented languages such as C++ allow us to work with these concepts directly. They allow us to create software objects in a running program that mimic the properties and behaviour of objects in the problem domain.

In order to create these software objects, we must first define software classes that specify:

  • The attributes possessed by objects of the class
  • The operations that can be performed by or on objects of the class

A key point to note is that classes in a programming language are simplifications or abstractions of real-world classes, in which we represent only those attributes and operations that are pertinent to the problem we are trying to solve.