Computing‎ > ‎A2 COMP‎ > ‎COMP3‎ > ‎Programming Concepts‎ > ‎


 Object-oriented Programming

WikiBooks OOP

A structured programming approach where problems are broken down into routines that execute a single task. Data can be passed in to routines through interfaces (parameters). OOP can reduce development time and improve reliability of code as Objects can be reused. Data items stored are known as fields and the routines are known as methods.

                                                                        Methods = function + procedures


A class is a construct that is used as a blueprint (or template) to create objects of that class.



An instance of a class e.g. string.



An object is defined based on a class.



Combining a record with the procedures and functions that manipulate it to form a new data type, a class.



Defining a class and then using it to build a hierarchy of descendant classes with each descendant inheriting access to all its ancestors’ code and data.



Giving an action one name that is shared up and down a class hierarchy. Each class in the hierarchy implements the action in a way appropriate to itself.