A real-world entity is anything that exists in the physical world and can be identified as a distinct object.
Examples include:
In the context of Object-Oriented Programming (OOP), these real-world entities are modelled as objects, with attributes and methods that represent their properties and behaviors.
In OOP an object is like a real-world entity that has two main characteristics:
Think of an object as a combination of data (attributes) and functions (methods) that work together. Objects are instances of classes, which are like blueprints that define the structure and behavior of the objects.
For example, take a pen:
In Object-Oriented Programming (OOP), entities are represented as objects.
We can think of an object as a combination of data (attributes) and functions (methods) that work together.
A class serves as a blueprint or template for creating objects.
For example, a Shape
class might have attributes like line color
and
fill colour
,and methods like draw()
and move()
.
An object is an instance of a class.
In this tutorial, we will use several classes. these are nomrally shown in a Class Diagram with attributes
and methods
clearly defined.
This is a development site to gather together teaching materials for AQA A Level Computer Science. It will be changing and being remodelled throughout this year.
No data is stored on the site but cookies are used to enable the website to function properly.
© 2025 Jay Patel - Dixons Sixth Form Academy, Bradford
Contact: jpatel@dixons6a.com