Im pretty green when it comes to designing a large scale application architecture, and have a question on the way I should go with it.
Just for an example, to ask the direction I should take my design in, consider this:
A parking lot manager has control over everything that happens in his parking lot. He is able to move cars to different parking spots if he wants, allow or dont allow new cars to park in his lot, etc....
So if the parking manager wants to move carOne from parking spot A to parking spot B, can the parking lot manager simply get in and move it him self, or should he be required to ask the owner of the car to move it for him.
To me, it seems like doing the latter, would require duplicate functions to accomplish something. IE Parking lot manager asks driver to move car, than driver moves car. aka 2 calls to accomplish one task. Although this seems wrong to me, it feels as though it better encapsulates all of the rules of the parking lot.
So to go about that in code...
You could say that Class B is composed of Class C and Class D while Class A consumes Class B. So you would have calls like a.b.doSomething(i){this->c.doSomething(i) or his->d.doSomething(i)}. Aka the multiple calls.
but if you had Class A which consumes Class C and class D you would have a.c.doSomething(i) or a.d.doSomething(i) and thats it.
I hope this makes sense and someone can guide me in the right design direction, or at least provide an opinion. Thanks