What is an Object
Every object has a responsibility, and modeling a program starts with listing the objects and what each one is for.
Novice · Java · OOP · Updated
Think about the things in your kitchen. Why do you have each one, and what is its job?
| Object Name | What is its purpose? |
|---|---|
| Refrigerator | stores food and keeps it cold |
| Cupboard | stores dishes and glasses |
| Dishwasher | cleans dishes |
| Plate | holds food |
Each kitchen object has a role. A cupboard stores dishes or glasses, a dishwasher cleans dishes, a plate holds food, and a refrigerator stores food and keeps it cold.
In other words, all these objects have a responsibility. If we were to model a kitchen in software, we would create virtual objects that do all the same things they do in real life.