Object Oriented Programming in Free Pascal

Free Pascal supports Object Oriened programming paradigm as well as structured programming, so that it is a multi paradigm language. In this example we will define TCar as a class (type). This class contains attributes (variables) and methods (procedures and functions). Before using this class, we need to declare and inistantiate objects (variables of class).…