New classes are formed by observing 2 kinds of relationships: is a and has a:
Is a relationships are those that lead to inheritance.
For example,
a sqaure is a rhombus,
a rhombus is a quadrilateral,
a quadrilateral is a polygon.
One can see a set of inheritance relations: square inherits from rhombus which inherits from quadrilateral
which inherits from polygon...lots of code reuse.
Has a relationships are those that lead to composition.
For example,
a car has an engine,
an engine has a carburetor,
a carburetor has a butterfly valve.
One can see that:
the car class might have an engine object as a member;
an engine class might have a carburetor object as a member.
a carburetor class might have a butterfly valve object as a member.