Deck 2: Introduction to Software Design

Full screen (f)
exit full mode
Question
A software product is developed in a sequence of stages known as a life __________.
Use Space or
up arrow
down arrow
to flip the card.
Question
A(n) __________ specification for a new software product should be generated at the beginning of a project.
Question
When designing software using __________ refinement, you start at the top level (the original problem) and divide it into subproblems.

A) piecemeal
B) iterative
C) stepwise
D) incremental
Question
Looking at the nouns in the problem statement can help you identify objects, and looking at the verbs can point to the __________.
Question
The common characteristics of a collection of similar objects define a class, and the interactions are identified as __________ that one object sends to another.
Question
An abstraction is a model of a physical entity or activity.
Question
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.
Question
In C++, the operators are called member __________.

A) functions
B) procedures
C) routines
D) methods
Question
In C++ there are two kinds of types: the __________ and the class types.

A) basic
B) programmer-defined
C) user-defined
D) primitive
Question
Members declared in the private part of a class definition can be accessed by any other class.
Question
The preprocessor directives ifndef, define, and __________ are used to prevent multiple definitions of the identifiers in header files.
Question
Which keyword should you insert in the member function defined below to protect "hours" from modification?
Int Clock::get_hours() __________ {
Return hours;
}

A) private
B) public
C) const
D) protected
Question
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;
Question
A constructor differs from a member function in that it has no __________.

A) local variables
B) name
C) parameter list
D) return type
Question
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).

A) modifier
B) constant
C) change
D) static
Question
In the context of the function header below, the operator "!=" is __________.
Bool operator!=(const Person& per) const;

A) overridden
B) overloaded
C) promoted
D) undefined
Question
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;
}

A) bool Person::can_vote(int year) const {
return age(year) >= the_age;
}
B) bool Person::can_vote(int year) const {
return age(year) >= VOTE_AGE;
}
C) bool Person::can_vote(int year) const {
return the_age >= age(year);
}
D) bool Person::can_vote(int year) const {
return the_age >= VOTE_AGE;
}
Question
The expression __________ is a reference to the object pointed to by "this".
Question
A test that demonstrates that certain requirements of a particular class are met is called a __________ test.

A) specification
B) use
C) driver
D) unit
Question
One way to make code reusable is to __________ or combine a group of data elements representing an object together with its operations (functions and operators) in a separate program module (a class).
Question
If the data fields in a C++ class are private, they can be accessed only through public functions.
Question
The classes that declare the data fields and code member functions that perform the operations are said to __________ the ADT.

A) define
B) construct
C) implement
D) specify
Question
An ADT is a(n) __________ between the ADT designer and the programmer who codes a class that implements the ADT.
Question
As a general rule, you should write a(n) __________ comment for operations that change an object's state.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/24
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Introduction to Software Design
1
A software product is developed in a sequence of stages known as a life __________.
cycle
2
A(n) __________ specification for a new software product should be generated at the beginning of a project.
requirements
3
When designing software using __________ refinement, you start at the top level (the original problem) and divide it into subproblems.

A) piecemeal
B) iterative
C) stepwise
D) incremental
stepwise
4
Looking at the nouns in the problem statement can help you identify objects, and looking at the verbs can point to the __________.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
5
The common characteristics of a collection of similar objects define a class, and the interactions are identified as __________ that one object sends to another.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
6
An abstraction is a model of a physical entity or activity.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
7
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.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
8
In C++, the operators are called member __________.

A) functions
B) procedures
C) routines
D) methods
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
9
In C++ there are two kinds of types: the __________ and the class types.

A) basic
B) programmer-defined
C) user-defined
D) primitive
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
10
Members declared in the private part of a class definition can be accessed by any other class.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
11
The preprocessor directives ifndef, define, and __________ are used to prevent multiple definitions of the identifiers in header files.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
12
Which keyword should you insert in the member function defined below to protect "hours" from modification?
Int Clock::get_hours() __________ {
Return hours;
}

A) private
B) public
C) const
D) protected
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
13
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;
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
14
A constructor differs from a member function in that it has no __________.

A) local variables
B) name
C) parameter list
D) return type
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
15
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).

A) modifier
B) constant
C) change
D) static
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
16
In the context of the function header below, the operator "!=" is __________.
Bool operator!=(const Person& per) const;

A) overridden
B) overloaded
C) promoted
D) undefined
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
17
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;
}

A) bool Person::can_vote(int year) const {
return age(year) >= the_age;
}
B) bool Person::can_vote(int year) const {
return age(year) >= VOTE_AGE;
}
C) bool Person::can_vote(int year) const {
return the_age >= age(year);
}
D) bool Person::can_vote(int year) const {
return the_age >= VOTE_AGE;
}
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
18
The expression __________ is a reference to the object pointed to by "this".
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
19
A test that demonstrates that certain requirements of a particular class are met is called a __________ test.

A) specification
B) use
C) driver
D) unit
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
20
One way to make code reusable is to __________ or combine a group of data elements representing an object together with its operations (functions and operators) in a separate program module (a class).
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
21
If the data fields in a C++ class are private, they can be accessed only through public functions.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
22
The classes that declare the data fields and code member functions that perform the operations are said to __________ the ADT.

A) define
B) construct
C) implement
D) specify
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
23
An ADT is a(n) __________ between the ADT designer and the programmer who codes a class that implements the ADT.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
24
As a general rule, you should write a(n) __________ comment for operations that change an object's state.
Unlock Deck
Unlock for access to all 24 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 24 flashcards in this deck.