What is OOP?
·
OOP is a design philosophy.
·
It stands for Object Oriented Programming. Object-Oriented Programming
(OOP) uses a different set of programming languages than old
procedural programming languages (C, Pascal, etc.).
·
Everything in OOP is grouped as self-sustainable "objects". Hence, you gain re-usability by means of
four main object-oriented programming concepts.
·
Today, many popular
programming languages (such as Java, JavaScript, C#, C++, Python, PHP, Ruby and
Objective-C) support object-oriented programming (OOP).
As an example,
suppose you wish to write a computer soccer games (which I consider as a
complex application). It is quite difficult to model the game in
procedural-oriented languages. But using OOP languages, you can easily model
the program accordingly to the "real things" appear in the soccer
games.
·
Player: attributes include name, number, location in the field,
and etc. operations include run, jump, kick-the-ball, and etc.
·
Ball:
·
Reference:
·
Field:
·
Audience:
·
Weather:
Most importantly, some of these
classes (such as Ball and Audience) can be reused in another
application, e.g., computer basketball game, with little or no modification.
No comments:
Post a Comment