Hello.
For a long time, teachers are faced with the task of teaching students to think objectively. The task is complicated. It is difficult to explain such things, you can only try to show it with examples. And even then, these examples often do not give an idea of what the teacher wants.
Today on the tape I offered second-year students an interesting task on the development of object thinking. Details further.
The task was as follows. There is a man and a cinema. A person in the cinema can perform various actions. For example, in cinemas there are very often slot machines and a person can play them. This implies the following model:
')

You understand that the model can be further detailed! Create a more accurate hierarchy, etc.
The task of the students is to create a model that allows to realize as many processes in the cinema as possible. At the same time, no stringent requirements were imposed on the model. Students could do it anywhere, in any way. Do not follow any notations. An object has action and properties. At the same time, actions and properties can be described in any language. No emphasis was placed on the correctness of the model, the correctness of inheritance, etc.
The result exceeded my expectations. :-) Students gladly got involved in the solution of the problem and offered very interesting and different models! For example, one girl made a very detailed model. Where a visitor could say hello to any other visitor, could lose a token or get drunk in a bar, and also pee in the toilet by and the doorman scolded him for it! :-) Others delved into the detail of the cinema, others described a very full casino in the cinema, with the ability to play poker and even possible combinations of this game. :-) And one guy realized the pattern of the team, not even knowing about the existence of it. :-)
In general, it was very interesting. :-)
After such an assignment, many students understood the essence of inheritance from the seller’s example. More precisely, they themselves have come to this. They understood that both the bartender, the cashier, and the grandmother in the toilet are all sellers and that they can sell anything. And their model, it is nice for me, was filled with the inheritance of specific sellers from the basic seller. :-)
In the next classes I want to continue such trainings, but each time complicate the task. For example, the next time, we will already describe the properties and methods rigidly. There is a property, it has a type. There is a method, it has a return type and parameters of a certain type. Next, let's start drawing models in the UML notation and focus on proper inheritance, and then learn how to extract interfaces and understand what encapsulation is.
In general, I am waiting for your opinion, advice and suggestions. :-) I am in a very good mood today! :-)