, , , . , . , "" "", " " "", , . ( OO, UML.)
In fact, I do not see the wrong code in the code. I am not a car, so I may be wrong in understanding the system. But if the engine of a real car needs a cooling system, I think you are doing it right. Yes, the engine class does call a property of the cooling system class, but since the engine uses the public method to call the cooling system, this is the right way. Again, I do not know the real car system, so I could be wrong in this particular project.
source
share