In School they dont really teach us anything ,so that we have to learn almost by ourselves. |
It's difficult, but you'll eventually have a eureka moment when it all snaps into place. When I was learning this stuff, there wasn't much around, just James Rumbaugh's book on OMT, so I understand your position.
I made a Aggregation from bike to Driver because the bike has only a driver not a passenger? |
Aggregation is a very strong kind of association. For example, a car has to have wheels, that's aggregation. Whereas a car has a driver (when in use), that's association.
As I said, a train already has an association to passenger, because it inherited that relationship from vehicle. It's wrong to draw a separate association directly between train and passenger in this case.
The association of passenger to vehicle means, "all types of vehicles have passengers". It gets tricky when we try to apply this to bike, so we say, "all types of vehicles have zero or more passengers". And that covers bikes, buses, cars and trains, ... all of them. That's what inheritance gives you, reuse.
I made still also a inhetitance from bike to vehicle? |
We've been over this before. Yes, a bike is a vehicle.
Should I also make a inheritance line <- from vehicle to Train? |
Again, yes. A train is a vehicle.