Some of the buzzwords in object oriented programming are
• Objects
• Classes
• Encapsulation
• Abstraction
• Inheritance
• Polymorphism
Objects
An object is a concrete instance of some classes. Objects are the basic entities in an object-oriented system. Each object is denoted by a name and has a state. The variables within the object express everything about the object(state) and the methods Specify how it can be used (behavior). For example, a bicycle has a state (the number of wheels and the current gear), and behavior (breaking, accelerat¬ing, slowing down, changing gears).
Method
A method is a function or a procedure that access to the internal state of the object needed to perform some operation. So, methods are functions defined inside the classes that operate on instances of those classes
Classes
A class is a blueprint or a prototype that defines the variables(data) and methods (code) common to all objects of certain kind. The class serves as a user-defined type. A class thus defines a data type that behaves like the built-in types of a programming language. An ob¬ject is an individual instance of a class.
Access to the variables and methods declared in a class depend on whether they are declared in private or public. A variable declared as public is visible everywhere. A variable declared as private is not visible outside the class.
3 Basics of OOP
November 20th, 2008 | Internet
0 comments ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment