OK, here is what it really means.
When you create programs using OOP what you do is that you categorize the logic of the whole program into objects.
Think that you are building a program for registering students for courses. Then you can define objects such as Student, Registration Officer and Course. The important thing to remember when you define objects is that they should actively participate in the program.
In OOP programming, logic is handled by objects. When you take an object it consists of following categories.
- Properties - Define how the object will look.
- Methods - Define how the object will behave.
Take the above student registration system. If you take the Student object it has properties such as
- Name
- Age
- Gender
- Date of Birth
And it has methods such as
- Select Course
- Pay Money
- Get Balance
How do you define objects?
Well how do you create a ceramic vase if you given the job?
You would first create a mould to create the vase. Won’t you?
The same applies to creating objects.
The mould for an object is called a Class.
No comments:
Post a Comment