Code example here
A library and a book can exists without each other, but usually a library contains books.
Code example here.
A house is composed of several rooms. Without rooms a house cannot exist.
Code example here.
The racecar is dependent on a driver in order to drive the car, but can exist without a driver. There can also be different drivers driving the car.
Code example here.
A racecar is a car and has the same functionality like steering, braking and so on. The racecar can have additional functionality like using turbo or other things which are not found in a standard car.
Code example here.
Interface like a blueprint. In this case we have a vehicle, which should be able to go forward, reverse, steer, brake, etc. There exists different kinds of vehicles like cars or boats, which have differnt methods of moving and steering.
The bluprint(abstract class) only defines the standard behavior every vehicle must have.