Sams Teach Yourself C++ in 21 Days

(singke) #1
Q In what way is object-oriented analysis and design fundamentally different
from other approaches?
A Prior to the development of these object-oriented techniques, analysts and pro-
grammers tended to think of programs as groups of functions that acted on data.
Object-oriented programming focuses on the integrated data and functionality as
discrete units that have both knowledge (data) and capabilities (functions).
Procedural programs, on the other hand, focus on functions and how they act on
data. It has been said that Pascal and C programs are collections of procedures, and
C++ programs are collections of classes.
Q Is object-oriented programming finally the silver bullet that will solve all
programming problems?
A No, it was never intended to be. For large, complex problems, however, object-
oriented analysis, design, and programming can provide the programmer with tools
to manage enormous complexity in ways that were previously impossible.
Q Is C++ the perfect object-oriented language?
A C++ has a number of advantages and disadvantages when compared with alterna-
tive object-oriented programming languages, but it has one killer advantage above
and beyond all others: It is the single most popular object-oriented programming
language for writing fully executable applications. This book exists—and I’d wager
you are reading it—because C++ is the development language of choice at so many
corporations.

Workshop ............................................................................................................


The Workshop provides quiz questions to help you solidify your understanding of the
material covered and exercises to provide you with experience in using what you’ve
learned. Try to answer the quiz and exercise questions before checking the answers in
Appendix D, and be certain you understand the answers before continuing to tomorrow’s
lesson.

Quiz ................................................................................................................



  1. What is the difference between object-oriented programming and procedural
    programming?

  2. What are the phases of object-oriented analysis and design?

  3. What is encapsulation?

  4. In regard to analysis, what is a domain?


368 Day 11

Free download pdf