A class is a blueprint; an object is a house built from it. One blueprint, many houses.
1 class = blueprint
Defines which data (members) and behaviour (methods) every object of that type will have.
2 object = house
One concrete instance built from the blueprint. Rex and Buddy are two Dogs from one class.
3 Data + behaviour together
An object carries its own fields (name, age) and its own actions (speak) — one tidy bundle.
4 public:
A label inside the class: everything below it may be used from outside, like myDog.name.
Blueprints and houses
class = blueprint1Defines which data (members) and behaviour (methods) every object of that type will have. object = house2One concrete instance built from the blueprint. Rex and Buddy are two Dogs from one class. Data + behaviour together3An object carries its own fields (name, age) and its own actions (speak) — one tidy bundle. public:4A label inside the class: everything below it may be used from outside, like myDog.name. 4 building blocks make up Blueprints and houses
Press play — the constructor fills the fields, then the method speaks for the object.
preprocessThe preprocessor pastes in iostream for cout.
Memory
no variables yet — press play
Console
output appears as the program runs…
The class is written once; the constructor stamps out independent objects, each with its own data.
process decision input / output start / end Click a term, then click its description to lock the pair.
5 conceptsTap a card to expand ?classdrops into place
?objectdrops into place
?constructordrops into place
?methoddrops into place
?public:drops into place
A constructor and three method calls — what prints?
Your predicted output — one line per console line
Hint: The constructor sets count to 0, then bump() runs three times — each call adds 1.
01A class is a blueprint; objects are instances built from it.
02The constructor runs automatically on creation — perfect for setup.
03Methods are functions that belong to an object.
04public: members (like myDog.name) are reachable from outside the class.
05One class can build many independent objects — each keeps its own data.