Object-Oriented Concepts
📋 What it is
Object-oriented programming bundles data and the actions on it into "objects" built from "class" blueprints.
🗣️ Coach says
OBJECT-ORIENTED programming models things as OBJECTS. A CLASS is a blueprint (like "Dog") and each object is one made from it (your dog "Rex"). Each object bundles its DATA (name, age) with the ACTIONS it can do (bark, sit). It keeps big programs organised by grouping related data and behaviour together.
🧠 Memory hook
Class = blueprint. Object = one made from it. Each bundles data + actions.
😂 Giggle
Why was the loop so dizzy?
Because it kept going around and around without a break statement!
😲 Whoa!
Object-oriented programming was inspired partly by biology — the idea of self-contained "cells" (objects) that each manage their own state and talk to others by messages.
✅ Quick check: What is the difference between a class and an object?
Say your answer out loud first — then reveal.
A class is a blueprint (e.g. "Dog"); an object is a specific one built from that blueprint (e.g. your dog "Rex") with its own data.
A class defines the template; objects are instances of it.
🧪 Try it! (2 minutes)
Design a "class" for a Car (its data: colour, speed; its actions: drive, brake) and name two objects made from it.