Chapter 1: Software Engineering Principles and C++ Classes
TRUE/FALSE
1.A program goes through many phases from the time it is first conceived until the time it is retired, called the life cycle of the program.
ANS:T PTS:1 REF:2
2.The three fundamental stages through which a program goes are implementation, use, and maintenance.
ANS:F PTS:1 REF:2
3.In the software maintenance process, the program is modified to fix the (identified) problems and/or to enhance it.
ANS:T PTS:1 REF:2
4.A program that is well developed is more expensive to maintain.
ANS:F PTS:1 REF:3
5.Software engineers typically break the software development process into the following four phases: analysis, design, implementation, and testing and debugging.
ANS:T PTS:1 REF:3
6.Dividing a problem into smaller subproblems is called structured design.
ANS:T PTS:1 REF:4
7.The structured design approach is also known as modular programming.
ANS:T PTS:1 REF:4
8.Encapsulation is the ability to handle data and operations as separate units.
ANS:F PTS:1 REF:4
9.In OOP, each object consists of data and operations on that data.
ANS:T PTS:1 REF:4
10.OOD has three basic principles: encapsulation, inheritance and polymorphism.
ANS:T PTS:1 REF:4
11.Encapsulation is the ability to create new data types from existing data types.
ANS:F PTS:1 REF:4
Data Structures Using C++ 2e D. S. Malik (Test Bank All Chapters, 100% Original Verified, A+ Grade) 1 / 4
12.Polymorphism is the ability to use the same expression to denote different operations.
ANS:T PTS:1 REF:4
13.A precondition is a statement specifying the condition(s) that must be true before the function is called.
ANS:T PTS:1 REF:5
14.A postcondition is a statement specifying what is true before the function call is completed.
ANS:F PTS:1 REF:6
15.In black-box testing, you do not know the internal working of the algorithm or function.
ANS:T PTS:1 REF:7
16.White-box testing relies on the internal structure and implementation of a function or algorithm.
ANS:T PTS:1 REF:8
17.The term asymptotic means the study of the function f as n becomes larger and larger without bound.
ANS:T PTS:1 REF:14
18.The components of a class are called objects.
ANS:F PTS:1 REF:17
19.If g(n) = 1, the growth rate is constant and does not depend on the size of the problem.
ANS:T PTS:1 REF:17
20.In C++, the mechanism that allows you to combine data and the operations on that data in a single unit is called a class.
ANS:T PTS:1 REF:17
21.The members of a class are classified into three categories: private, public, and main.
ANS:F PTS:1 REF:18
22.Private, public, and protected are member access specifiers.
ANS:T PTS:1 REF:18
23.A class and its members can be described graphically using a notation known as Unified Modeling Language (UML) notation.
ANS:T PTS:1 REF:22
24.Class objects cannot be passed as parameters to functions or returned as function values.
ANS:F PTS:1 REF:32 2 / 4
25.As parameters to functions, class objects can be passed only by reference.
ANS:F PTS:1 REF:32
MULTIPLE CHOICE
1.The three fundamental stages a program goes through are: development, use, and ____.a.implementationc.analysis b.maintenanced.requirements gathering
ANS:B PTS:1 REF:2
2.When a program is considered too expensive to maintain, the developer might decide to ____ the program and no new version of the program will be released.a.deletec.retire b.restructured.release
ANS:C PTS:1 REF:2
3.____ is the first and most important step of the software development process.a.Analyzing the problem c.Implementing the software b.Designing the software d.Test marketing
ANS:A PTS:1 REF:3
4.A(n) ____ is a step-by-step problem-solving process in which a solution is arrived at in a finite amount of time.a.design planc.process plan b.algorithmd.structured program
ANS:B PTS:1 REF:4
5.The structured design approach is also known as ____.a.top-down designc.object design b.bottom-up designd.stepwise updating
ANS:A PTS:1 REF:4
6.____ is the ability to create new data types from existing data types.a.Encapsulationc.Inheritance b.Information hidingd.Polymorphism
ANS:C PTS:1 REF:4
7.____ is the ability to use the same expression to denote different operations.a.Overloading operators c.Inheritance b.Polymorphismd.Encapsulation
ANS:B PTS:1 REF:4
8.The output of ____ is immediately sent to the standard error stream, which is usually the screen.a.cerrc.cerror b.coutd.cerrout
ANS:A PTS:1 REF:5 3 / 4
9.The main types of testing are ____ testing.a.white-box and blue-box c.white-box and green-box b.black-box and blue-box d.white-box and black-box
ANS:D PTS:1 REF:7
10.In the function ____, the growth rate is a function of the base 2 logarithm of n.a.g(n)=1c.g(n)=nlog2n b.g(n)=log2nd.g(n)=2 n
ANS:B PTS:1 REF:17
11.In the function ____, the growth rate is quadrupled when the problem size is doubled.a.g(n)=1c.g(n)=n 2 b.g(n)=nlog2nd.g(n)=2 n
ANS:C PTS:1 REF:17
12.In the function ____, the growth rate is exponential.a.g(n)=1c.g(n)=nlog2n b.g(n)=n 2 d.g(n)=2 n
ANS:D PTS:1 REF:17
13.A(n) ____ is a collection of a fixed number of components.a.objectc.class b.memberd.friend
ANS:C PTS:1 REF:17
14.The components of a class are called the ____ of the class.a.operatorsc.objects b.friendsd.members
ANS:D PTS:1 REF:17
15.The members of a class are classified into three categories called ____ access specifiers.a.memberc.function b.objectd.object
ANS:A PTS:1 REF:18
16.Deciding which member to make private and which to make public depends on the ____ of the member.a.naturec.function b.sized.identity
ANS:A PTS:1 REF:19
17.By default, all members of a class are ____.a.publicc.private b.protectedd.open
ANS:C PTS:1 REF:20
18.To guarantee that the instance variables of a class are initialized, you use ____.
- / 4