Programming in the small
Programming in the large
An Object Model
Our object model includes following components:
An object is a separately identifiable entity that has a set of operations and a state that records the effects of the operations. That is, an object is essentially the same as an abstract data structure. Objects are characterized by:
A class is a template for creating objects. A class describes a collection of related objects (i.e., instances of the classes). Objects of the same class have common operations and a common set of possible states. The concept of class is closely related to the concept of abstract data type that we discussed previously. A class description includes definitions of
A class D inherits from class B if D's objects form a subset of B's objects. Class D's objects must support all of the class B's operations (but perhaps are carried out in a special way).Class D may support additional operations and an extended state (i.e., more information fields). Class D is called a subclass or a child or derived class. Class B is called a superclass or a parent or base class.
The concept of polymorphism (literally "many forms"). Polymorphism appears in several forms. Overloading (or ad hoc polymorphism). Parametric polymorphism denotes the use of parameterized type (or class) definitions. Polymorphism by inheritance (sometimes called pure polymorphism . The concept of polymorphism (literally "many forms") Polymorphism appears in several forms.
Encapsulation a way of packaging information. Encapsulation allows the programmer to present clearly specified interfaces around the services they provide. The programmer can decide what should be hidden and what is intended to be visible.
Abstraction refers to the act of representing essential features without including the background details or explanations. It is the art of concentrating on the essential and ignoring the non-essential. Classes that use the concept of data abstraction are known as "abstract data types". Abstract data types are achieved by making certain variables and methods in a class private.
Why is OOP Popular?
To get more papers like topical questions, KCSE and KCPE KNEC revision papers and resources, all levels of Kenyan revision materials and other academic aides, which are in downloadable format, visit our sister site and register as a member. To learn on registration, click here.
Form 1 to Form 4 kcse past papers latest
Pre-Primary 1 to Std 8 Latest KCPE Past papers
KNEC PAPERS FOR COLLEGE
Contact us anytime
Trusted by over 500 schools and colleges
The list keeps growing 'day in, day out' ... List of Schools in Kenya