Answers to Self Review Exercises


a) Apple. b) IBM Personal Computer. c) programs. d) input unit, output unit, memory unit, arithmetic and logic unit, central processing unit, secondary storage unit. e) machine languages, assembly languages and high-level languages. f) compilers. g) UNIX. h) Pascal. i) multitasking.


a) editor. b) preprocessor. c) linker. d) loader.


a) information hiding. b) classes. c) associations. d) object-oriented analysis and design (OOAD). e) inheritance. f) The Unified Modeling Language (UML). g) attributes.


Categorize each of the following items as either hardware or software:

  1. CPU
  2. C++ compiler
  3. ALU
  4. C++ preprocessor
  5. input unit
  6. an editor program

Why might you want to write a program in a machine-independent language instead of a machine-dependent language? Why might a machine-dependent language be more appropriate for writing certain types of programs?


Fill in the blanks in each of the following statements:

  1. Which logical unit of the computer receives information from outside the computer for use by the computer? ________.
  2. The process of instructing the computer to solve specific problems is called ________.
  3. What type of computer language uses English-like abbreviations for machine-language instructions? ________.
  4. Which logical unit of the computer sends information that has already been processed by the computer to various devices so that the information may be used outside the computer? ________.
  5. Which logical unit of the computer retains information? ________.
  6. Which logical unit of the computer performs calculations? ________.
  7. Which logical unit of the computer makes logical decisions? ________.
  8. The level of computer language most convenient to the programmer for writing programs quickly and easily is ________.
  9. The only language that a computer directly understands is called that computer's ________.
  10. Which logical unit of the computer coordinates the activities of all the other logical units? ________.

Why is so much attention today focused on object-oriented programming in general and C++ in particular?


Distinguish between the terms fatal error and nonfatal error. Why might you prefer to experience a fatal error rather than a nonfatal error?


Give a brief answer to each of the following questions:

  1. Why does this text discuss structured programming in addition to object-oriented programming?
  2. What are the typical steps (mentioned in the text) of an object-oriented design process?
  3. What kinds of messages do people send to one another?
  4. Objects send messages to one another across well-defined interfaces. What interfaces does a car radio (object) present to its user (a person object)?

You are probably wearing on your wrist one of the world's most common types of objectsa watch. Discuss how each of the following terms and concepts applies to the notion of a watch: object, attributes, behaviors, class, inheritance (consider, for example, an alarm clock), abstraction, modeling, messages, encapsulation, interface, information hiding, data members and member functions.

Introduction to Computers, the Internet and World Wide Web

Introduction to C++ Programming

Introduction to Classes and Objects

Control Statements: Part 1

Control Statements: Part 2

Functions and an Introduction to Recursion

Arrays and Vectors

Pointers and Pointer-Based Strings

Classes: A Deeper Look, Part 1

Classes: A Deeper Look, Part 2

Operator Overloading; String and Array Objects

Object-Oriented Programming: Inheritance

Object-Oriented Programming: Polymorphism


Stream Input/Output

Exception Handling

File Processing

Class string and String Stream Processing

Web Programming

Searching and Sorting

Data Structures

Bits, Characters, C-Strings and structs

Standard Template Library (STL)

Other Topics

Appendix A. Operator Precedence and Associativity Chart

Appendix B. ASCII Character Set

Appendix C. Fundamental Types

Appendix D. Number Systems

Appendix E. C Legacy Code Topics

Appendix F. Preprocessor

Appendix G. ATM Case Study Code

Appendix H. UML 2: Additional Diagram Types

Appendix I. C++ Internet and Web Resources

Appendix J. Introduction to XHTML

Appendix K. XHTML Special Characters

Appendix L. Using the Visual Studio .NET Debugger

Appendix M. Using the GNU C++ Debugger


C++ How to Program
C++ How to Program (5th Edition)
ISBN: 0131857576
EAN: 2147483647
Year: 2004
Pages: 627

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