Реферат на тему Object Oriented Programming Essay Research Paper THE
Работа добавлена на сайт bukvasha.net: 2015-06-18Поможем написать учебную работу
Если у вас возникли сложности с курсовой, контрольной, дипломной, рефератом, отчетом по практике, научно-исследовательской и любой другой работой - мы готовы помочь.
Object Oriented Programming Essay, Research Paper
THE ADVANTAGES OF OBJECT-ORIENTED PROGRAMMING USING C++
Object-oriented programming is a new way of approaching the job of programming. Programming over the years has evolved to accommodate the increased complexity of programs. (1) Structured, easy to understand programming has been around since the late 60’s. These advances allowed programmers to write fairly complex programs relatively easy using such languages as C and Pascal. However, once a program reached a certain size it was just too complex to manage. In 1980 at Bell Laboratories in Murray Hill, New Jersey, Bjarne Stroustrup developed a new programming paradigm. (2) His new concept was built on structured programming and incorporated a few new powerful ideas. Some of the more noteworthy include Classes, Polymorphism, overloading, and inheritance.
C itself is a powerful language to begin with. C++ builds on C to make it much easier to deal with very large programs, as well as providing the tools to build black boxes. A black box, or object, is some code that performs a function with a specific type of input and gives a specific type of output.Once a black box or function is implemented, clear concise notation is used to apply the function. Condsider the following C code and output.
int daysinweek = 7;
printf(”Hello world there are %d days in a week”,daysinweek);
This would give us the output
Hello world there are 7 days in a week
There are numerous print functions in C and to use them correctly you must know the correct parameters. For C++ however, the use of operator overloading and Polymorphism allow the programmer to freely flow any type of data to the screen regardless of data type. Like so.
cout