Published: August 26, 2008
By Richard G. Baldwin
File: AdvCpp00110PracticeTest
1. True or False: You must always program using an object-oriented paradigm when programming with C++.
2. True or False: In OOP, the expression of an algorithm should model the application domain that it supports.
3. True or False: If a program is object oriented, it adheres to the characteristics of:
4. True or False: An object-oriented program has four fundamental characteristics:
However, some authors combine the first and second of these characteristics, resulting in only three fundamental characteristics.
5. True or False: An object is an instance of a data type.
6. True or False: Abstraction is the definition of an abstract data type, which includes the data type's representation and behavior.
7. True or False: The jargon instantiate is used by programmers as a verb to describe the creation of an instance of a data type, or the creation of a function.
8. True or False: A programmer encapsulates the data representation and behavior of an abstract data type into a class, giving it its own implementation and interface.
9. True or False: An encapsulated design hides its implementation from the class user while revealing its data members.
10. True or False: C++ OOP produces good designs by default.
11. True or False: Method is another name for C++ member functions. Methods may be data members, destructors, functions, and overloaded operators. They define the class interface.
12. True or False: A message is the invocation of a method, which in C++ is the same thing as calling the public member function. The program sends a message to an object telling it to execute the method and sometimes provides parameters for the method to use.
13. True or False: There are three different kinds of methods characterized by how they support the class definition:
14. True or False: Typical method variants for functional methods include the following actions:
15. True or False: Data type methods make a class act like a primitive data type by giving it properties similar to those of a primitive data type. These properties are usually implemented as overloaded operators in the class interface.
16. True or False: If you write an expression where the compiler expects an abstract data type, and you provide a different data type, primitive or abstract, the compiler knows inherently how to deal with that. Similarly, if the expression expects a primitive data type, and you use an abstract data type, the compiler knows what to do.
17. True or False: A new class can inherit the characteristics of an existing class.
18. True or False: A program can instantiate objects of a base class as well as those of a derived class provided that the base class is an abstract base class.
19. True or False: Multiple inheritance is a powerful and trouble-free programming concept, so you should never hesitate to use it.
20. True or False: C++ supports three kinds of polymorphism:
Copyright 2008, Richard G. Baldwin.
Reproduction in whole or in part in any form or medium
without express written permission from Richard Baldwin is prohibited.
Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
Copyright 2008, Richard G. Baldwin. Reproduction in whole or in part in any form or medium without express written permission from Richard Baldwin is prohibited.
Richard Baldwin is a college professor (at Austin Community College in Austin, TX) and private consultant whose primary focus is a combination of Java, C#, and XML. In addition to the many platform and/or language independent benefits of Java and C# applications, he believes that a combination of Java, C#, and XML will become the primary driving force in the delivery of structured information on the Web.Richard has participated in numerous consulting projects and he frequently provides onsite training at the high-tech companies located in and around Austin, Texas. He is the author of Baldwin's Programming Tutorials, which have gained a worldwide following among experienced and aspiring programmers. He has also published articles in JavaPro magazine.
In addition to his programming expertise, Richard has many years of practical experience in Digital Signal Processing (DSP). His first job after he earned his Bachelor's degree was doing DSP in the Seismic Research Department of Texas Instruments. (TI is still a world leader in DSP.) In the following years, he applied his programming and DSP expertise to other interesting areas including sonar and underwater acoustics.
Richard holds an MSEE degree from Southern Methodist University and has many years of experience in the application of computer technology to real-world problems.
-end-