Regarding the object-oriented approach to programming there is a relationship between an object, class and method
OOP uses objects and classes- and includes both data and associated processing
Uses classes and methods.
Class: template specifying methods/properties etc. A class defines the methods properties (data) for a group of similar objects
Method: program (routine) defined within the class/contained within the object
Uses features such as
–Encapsulation – technical implementation is hidden within the object. It involves the protection of attributes and methods of an object so that they can't be accessed or altered by other objects.
–Inheritance – is the means by which properties and methods from a class are copied to another class e.g. Mammal to human
–Polymorphism – a form of overloading which allows us to create general object structures which can be used with a wider range of data types. Polymorphism is known as "many forms".
Once an object is created, knowledge of its implementation is not necessary for its use. The process of creating an object from a class template is known as INSTANTIATION.
Objects created using object oriented languages can easily be reused in other programs
Objects control how other objects interacts with themselves, preventing other kinds of errors, e.g. a programmer cannot set the width of a window to -500
In some languages, the programmer places objects on forms. These are event-driven languages
Enables production of buttons / icons etc. - useful in a visual environment
An event, e.g. click a command button, initiates a sequence of code to be executed
OOP Revision Videos
Video Part 1
OOP Revision Videos
Video Part 2
OOP Revision Videos
Video Part 3
OOP Revision Videos
Video Part 4
OOP Revision Videos
Video Part 5