Lecture 13
Introduction to Object-Based Programming (OBP)
1. Object-Based Programming Overview
o Object-Based Programming (OBP) is a component-based
approach to software development where systems are created by
defining a set of classes.
o OBP allows for the expansion of systems by adding new capabilities
to existing classes or creating new systems from existing classes,
thereby reducing development time.
2. Unified Modelling Language (UML)
o UML is used to facilitate the modelling of these classes and
objects, which can then be created in software.
3. Real-World Object Simulation
o OBP simulates real-world objects in software, mimicking their
behaviour and properties, such as in a calculator application.
o This simulation is consistent whether using an Object-Oriented
Programming (OOP) methodology or not.
Core Concepts in Object-Based Modelling
1. Objects and Classes
o An Object has structure (properties) and behaviour (operations it
performs), collectively referred to as features.
o A Class categorizes these properties and behaviours and acts as a
template for creating objects.
2. Example: Car Class
o A car class might have attributes like make, model, engineSize, and
gears, and operations like turnOnIgnition(), takePassengers(), and
reverse().
o New car objects can be created based on this class.
3. Abstraction in Object Modelling
o Abstraction involves selecting only the necessary properties and
operations to include in the model, making it a core skill in OOP.