OBJECT ORIENTED PROGRAM
OBJECT ORIENTED PROGRAM
2. Properties: Add properties to the class to store data relevant to the class. These
properties represent the state or characteristics of an object. For instance, in the
"Person" class, you can define properties like "Name: string" and "Age: Integer."
3. Methods: Implement methods within the class to define the behaviors of the objects.
These methods can perform specific actions or manipulate the properties of an object.
For example, in the "Person" class, you can have methods like "Introduce: procedure()"
that will display the person's name and age.
4. Constructors: Constructors are special methods used to initialize the object's
properties when an instance of the class is created. Delphi allows you to define
constructors for your classes, which are executed automatically when an object is
instantiated.
Object Instantiation: Finally, after defining your class, you can create instances of the
class known as objects. Instantiating an object allocates memory for the object and
allows you to work with its properties and methods.
TYPES OF METHODS
1. Mutator-set methods
-are used to change the properties of an object
-must be declared as public methods