By Raul Bernardino
In the general, when we are
developing system applications or computer programs with the object oriented or
structured programming languages, we will meet several advantages and
disadvantages. [1] Pascal and Assembler are examples of structured programming languages. Pascal is most popular uses to
teach and helping students in the formal education. The structured programming language
depends on the series of statements of the commands in which they are straight
and cannot redirect to execute the statements in other area of the programming.
[2] If we compare the structured of the programming to the object oriented programming languages, the object oriented contains
of the modular, which are can be reusable.
As it’s a modular, it can be executed at several points, through-out the
program. Moreover, it means, we do not need to rewrite the complexity of classes
or functions. What we need to do, is to reuse them (modular). The popular
object oriented languages are Java and
C++.
The advantage of using structured
programming: It does not need to classes
and complex functions. It is simply writing a straight forward piece of code,
and totally depends on the purpose of having the program or application. We have to define program with a flexibility of creating function
and procedures.
The disadvantage of using structure
programming: It will be taking up more
time and energy to developing codes. We have to rewrite similar procedures or
functions during programming code because it is not a reusable section. The
procedure, function, and code are executing sequential. Therefore, you may found
several similar codes repeatedly in the program. In short, we have to recreate same functions or procedures for
same program.
The advantages to using object oriented
programming languages: It consists of modular. It allows us to write a reusable
piece of codes such as a function or a class, and it can be reuse multiple
times in one program without to rewrite the whole process. This can save the
developer much more time and effort in the development process. It can be distribute among the applications in the same platform
which calls Application Program Interface (API). Some functions can be recalling
from another program without recreate them. In the short, create a program as an object
oriented naturally comes with events, function, method or modular, procedures,
and property.
The disadvantages of using an object
oriented programming language: Probably one the disadvantage is full of
complexity.
It is not recommended to use object oriented
languages when developer is developing smaller or less complex programs or
programs that are built to run on low powered computers, however it is
recommend to use object oriented when it is more complex and programs or
applications that runs in more powered computers.
[3] The object oriented language
paradigm is reflecting to the human way of thinking and conceptualizing. Why is
that, it is because in the object oriented language often use the exiting
modular to it owns purposes of programming.
Talking about some keys concept of
object oriented language, I can analogy them as a book.
[4] Object: Gray Booch, (1991) define the object as “something you can do things to”. In this
case, book is an object for us to read or write. Car is an object for us to use
or drive.
[5] Function: the book can
give us an answer or give us a reference of knowledge. The function in the
object oriented is a program unit whereas we can call. It will be processing
the inputs according to the function and it will return or giving an output or
an answer to calling program unit.
Procedure:
Who allow having or can read the book. How you get the book (buys it or borrows
it). The book (control) is transferred to you to take over once you finished
the reading you return to the owner. In this case procedure takes over the
control and will return the result to the calling program unit once it
processed.
Event: It
is a processing of reading and writing a book. An event is away for class to
provide notification when something interest come about.
Method:
How you would like open or close the book. The Method is a collection of
procedures in which contains a series of statements whereas to describe how the
object is respond to the range on various event.
References:
[1] Janea Tyalor, Computers are Fun [internet].Available from:
http://janeataylor.wordpress.com/2005/12/02/structured-vs-object-oriented-programming/ (Accessed:
5 November 2010)
[2]
J. Glenn Brookshear, (2009) Computer
science: An Overview. 10th Edition, Boston: Pearson Addison
Wesley, Ch 6, P.281
[3]
Advantages and Disadvantages of
Object-Oriented Approach [internet]. Available from: http://www.dba-oracle.com/t_object_oriented_approach.htm
(Accessed: 5 November 2010)
[4] Booch, Grady. Object-Oriented Design with Applications.
The Benjamin/Cummings Publishing Company, Inc. Redwood City, CA. 1991, P. 516
[internet]. Available from: http://www.umsl.edu/~sauterv/analysis/ooa.html#REF_1 (Accessed: 5 November 2010)
[5] Key
Object-Oriented Concepts and how to use them in Visual C# [Internet].
Available from:
Moreover, Structured programming can be considered as a part of the imperative paradigm. It is based on control structures. There are four main control structures (Kennet, 2010) Control structures can be mapped using flowcharts.
ReplyDelete1. Sequence: Writing code in a linear fashion
2. Selection: Deciding on choosing between two or more flows.
3. Iteration: Repetition, instructions can be executed many times until some condition will be met.
4. Branching: A control structure that allows the flow of execution to jump to a different part of the program.
This model is associated with the “go to less” concept, or the “top-down” model of design which is based on analysis, and decomposition of problems.
Reference,
http://cnx.org/content/m19628/latest/
This comment has been removed by the author.
ReplyDeleteAdditionally, [1]According to Giard (2009)
ReplyDeleteEncapsulation is just help decoupling because external object cannot change the internal attributes of an object. Decoupling is also one of the concepts which can helps developer a lot and this
concept is mostly ignored by the people who are trying to build Object-Oriented System.
[2] While Polymorphism is the ability to use an operator or function in different ways. Polymorphism gives
different meanings or functions to the operators or functions. Poly, referring to many, signifies the
many uses of these operators and functions. A single function usage or an operator functioning in
many ways can be called polymorphism. Polymorphism refers to codes, operations or objects that
behave differently in different contexts.
Bibliography
[1] David Giard,2009. “Object Oriented Programming, Part 3: OOP Concepts” [online]. Available at :
http://nplus1.org/articles/object-oriented-programming-part-3-oop-concepts/ (Accessed: 10 November 2010)
[2]http://www.exforsys.com/tutorials/c-plus-plus/polymorphism-an-introduction.html