Well, the first thing you need to understand is OOAD (Object Oriented Analysis and Design) - a tool, not a means to an end. What you get from this process is a model, not a true representation of what you are modeling. This model makes certain assumptions. The goal of this model is to solve the problem you have.
So how do you know how to design objects? How do you know if you did it right? Towards the end of the job: does your problem solve?
So, for the Car example, in some models the number of cars may simply be an integer, for example, car traffic through the intersection of the traffic model. In such a model, you rarely care about the make, model or design of cars, just about quantity. You may care about the type of vehicle to the extent that it is a truck or a car (for example). Do you model this as a vehicle object with a type of car or truck? Or just split carCount and truckCount?
Short answer: which one works best.
A normal test of whether an object is or not, does it have behavior? Remember that ultimately objects = data + behavior.
So you can say that cars have the following condition:
wheels
- Suspension height;
- Left or right drive;
- Colour
- Width;
- Weight
- Length;
- Height;
doors;
- Does he have a sunroof,
- Does it have a stereo, CD player, MP3 player and / or satnav;
- Tank size;
- Number of cylinders;
turbocharging and / or fuel injection;
- Maximum torque;
- Maximum braking power;
- etc.
Most likely, you will only care about a small subset: select everything that matters. A racing game may include more detailed information about the wheels, for example, how hot they are, how worn out they are, the width and type of tread, and so on. In this case, the Wheel object can be called the totality of this state (but small behavior), since the car has several wheels, and the wheels are interchangeable.
Thus, a second point arises around the objects: the object may exist due to the relationship, so the object is a complete set of data. Thus, the wheel may have patronage, width, temperature, and so on. You cannot share this and say that the car has a tread, but there is no wheel width, so it makes sense for the Wheel to be an object, since the wheel in it is completely interchangeable.
But then again, does that make sense for what he's doing? This is a key question.