From C to C and Object-oriented Programming

Chapter 16 - Object-oriented Programming Foundations

Visual C++ 6: The Complete Reference
Chris H. Pappas and William H. Murray, III
  Copyright 1998 The McGraw-Hill Companies

Traditional Structured Programming
The earlier chapters of this book were devoted to teaching traditional procedure-oriented structured programming techniques for solving C and C++ problems. These chapters introduced you to fundamental C and C++ syntax in a familiar programming environment. Procedure-oriented programming is common among all structured languages, including C, C++, Pascal, and PL/I. A procedure-oriented C or C++ program is structured in such a way that there is typically a main( ) function and possibly one or more functions (subroutines) that are called from the main( ) function. This is a top-down approach. The main( ) function is typically short, shifting the work to the remaining functions in the program. Program execution flows from the top of the main( ) function and terminates at the bottom of the same function.
In this approach, code and data are separate. Procedures define what is to happen to data, but the two never become one. You’ll see that this changes in object-oriented programming. The procedural approach suffers from several disadvantages, chiefly program maintenance. When additions or deletions must be made to the program code, such as in a database program, the entire program must often be reworked to include the new routines. This approach takes enormous amounts of time in both development and debugging. A better approach toward program maintenance is needed.

Books24x7.com, Inc 2000 –  


Visual C++ 6(c) The Complete Reference
Visual Studio 6: The Complete Reference
ISBN: B00007FYGA
EAN: N/A
Year: 1998
Pages: 207

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net