The Stack Overflow podcast is back! Listen to an interview with our new CEO.
4 of 7 added 9 characters in body

Get inspired by real word objects and their intractions? Could it be a technique in OOP?

Based on this question I think while the aim of OOP is not necessarily to copy real world objects, they could be source of inspiration to design a software or solve a problem.

For example for an application which deals with drawing, a Bitmap could be regarded like a Page, then as a page has back color, we can define a BackColor attribute for it. But we may realize a real page has not text color and it's the attribute of the pen, so we can define a class named Pen which is used for drawing and has a Color, LineWeight....

I don't talk about abstraction or OOP stuff as it is in this question, (I am not an OOP guru) I just know if I hadn't that analogy, I may couldn't write my program.

I always look for such analogy and inspirations of objects and their intractions when I develop a software, but I don't have a systematic or clear definition for what I am doing. I don't know which aspects of OOP I am copying. Please note even names could help me. Page is a better name than XYZ for my class.

Is it an acceptable technique in OOP? Is it possible that I violate an OOP guideline while I am using this technique?

I would like to know how this technique may help me to follow OO principles and what is their relation, so I can consciously do it.