Example of OOPs using Cars:-
Consider the example of where you don’t want to use just one car but 100 cars. Rather
than describing each one in detail from scratch, you can use the same car class to
create 100 objects of the type ‘car’. You still have to give each one a name and other
properties, but the basic structure of what a car looks like is the same.
Here we will make Car class, and it will work as a basic template for other objects. We
will make car class objects (Ferrari, BMW, and Mercedes). Each Car Object will have its
own, Year of Manufacture, model, Top Speed, color, Engine Power, efficiency, etc.
The car class would allow the programmer to store similar information unique to each
car (different models, colors, top speeds, etc.) and associate the appropriate
information.

Understanding example using flowchart:-