Escolar Documentos
Profissional Documentos
Cultura Documentos
Polymorphism - Objects that are different from one another but use the same communication
interface
Events - Objects respond & triggers events
CLASS
Defines the structure and functionality of an Object.
ATTRIBUTES - Defines the data the Object will contain
Methods - Defines the functionality of the Object
When we define a class we define:
Definition - We declare the attributes & Method Interfaces
Implementation - Definition of the Methods
CLASS
CLASS myclass DEFINITION.
.....
ENDCLASS.
CLASS myclass IMPLEMENTATION.
.....
ENDCLASS.
We must have both DEFINITION & IMPLEMENTATION
When we create a CLASS no object is created.We are just defining the BLUEPRINT for what
objects based on this class contain and do.
Classes can be defined locally or Globally(using SE24 - Class Builder)
Object - An instance of a class. We instantiate an object based on the blueprint.
Allows us to store data and/or allow method execution
A class definition can define the following:
types, constants, data objects(attributes), and method interfaces.
We can choose how we define the visibility of attributes
Public - available from outside the object.
Private - available only within the object itself.
Protected A Public attribute may be designated as READ-ONLY.
A READ-ONLY attribute only really makes sense in a PUBLIC SECTION.
STATIC Attributes
A Static attribute is a shared attribute across all objects based on a class.
It is not dependant on instantiation of each object. This means we can access a static
attribute without creating an object.
All of the objects in a class have access to static attributes
Declare them using the CLASS-DATA statement.
Changing the value of a static attribute will make the changed value visible in all other objects