Exam 2: Introduction to Software Design
Exam 1: P A C++ Primer25 Questions
Exam 2: Introduction to Software Design24 Questions
Exam 3: Program Correctness and Efficiency25 Questions
Exam 4: Inheritance and Class Hierarchies25 Questions
Exam 5: Sequential Containers25 Questions
Exam 6: Stacks24 Questions
Exam 7: Queues and Deques25 Questions
Exam 8: Recursion25 Questions
Exam 9: Trees25 Questions
Exam 10: Sets and Maps25 Questions
Exam 11: Sorting25 Questions
Exam 12: Self-Balancing Search Trees25 Questions
Exam 13: Graphs25 Questions
Exam 14: Advanced C++ Topics, and Overview of UML25 Questions
Select questions type
Looking at the nouns in the problem statement can help you identify objects, and looking at the verbs can point to the __________.
Free
(Short Answer)
4.8/5
(36)
Correct Answer:
operators
Which keyword should you insert in the member function defined below to protect "hours" from modification?
Int Clock::get_hours() __________ {
Return hours;
}
Free
(Multiple Choice)
4.8/5
(36)
Correct Answer:
C
Members declared in the private part of a class definition can be accessed by any other class.
Free
(True/False)
4.9/5
(34)
Correct Answer:
False
In the code segment below, the modifier "static" indicates that the constant VOTE_AGE is being defined for the class and does not have to be replicated in each instance.
static const int VOTE_AGE = 18;
(True/False)
4.8/5
(33)
A constructor differs from a member function in that it has no __________.
(Multiple Choice)
5.0/5
(34)
When designing software using __________ refinement, you start at the top level (the original problem) and divide it into subproblems.
(Multiple Choice)
4.8/5
(40)
If the data fields in a C++ class are private, they can be accessed only through public functions.
(True/False)
4.8/5
(42)
Which of the following functions correctly condenses the body of can_vote () appearing directly below.
Bool Person::can_vote(int year) const {
Int the_age = age(year);
/* VOTE_AGE is a private data member of Person class*/
Return the_age >= VOTE_AGE;
}
(Multiple Choice)
4.8/5
(40)
The preprocessor directives ifndef, define, and __________ are used to prevent multiple definitions of the identifiers in header files.
(Short Answer)
4.7/5
(43)
If we want to allow a class user to update or modify the value of a data field, we provide a __________ function beginning with the word set and ending with the name of the data field (for example, set_given_name).
(Multiple Choice)
4.9/5
(44)
A(n) __________ specification for a new software product should be generated at the beginning of a project.
(Short Answer)
4.9/5
(36)
In C++ there are two kinds of types: the __________ and the class types.
(Multiple Choice)
4.9/5
(40)
The classes that declare the data fields and code member functions that perform the operations are said to __________ the ADT.
(Multiple Choice)
4.9/5
(37)
An ADT is a(n) __________ between the ADT designer and the programmer who codes a class that implements the ADT.
(Short Answer)
4.8/5
(42)
The common characteristics of a collection of similar objects define a class, and the interactions are identified as __________ that one object sends to another.
(Short Answer)
4.8/5
(40)
In the __________ view of a data object, you can describe what information is stored in the data object without being specific as to how the information is organized and represented.
(Short Answer)
4.7/5
(41)
A test that demonstrates that certain requirements of a particular class are met is called a __________ test.
(Multiple Choice)
4.7/5
(31)
In the context of the function header below, the operator "!=" is __________.
Bool operator!=(const Person& per) const;
(Multiple Choice)
4.8/5
(39)
Showing 1 - 20 of 24
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)