Deck 2: Principles of Programming and Software Engineering

Full screen (f)
exit full mode
Question
A top-down design identifies actions by focusing on the ______ in the problem statement.

A)nouns
B)verbs
C)adjectives
D)adverbs
Use Space or
up arrow
down arrow
to flip the card.
Question
The syntax errors of a program are removed during the ______ phase of the program's life cycle.

A)verification
B)coding
C)testing
D)refining
E)maintenance
Question
The data flow among the modules of a program is specified during the ______ phase of the software life cycle.

A)specification
B)design
C)coding
D)verification
Question
A statement about a particular condition at a certain point in an algorithm is called a(n)______.

A)base case
B)invariant
C)assertion
D)loop invariant
Question
Modularity describes a program that is organized into ______.

A)loosely coupled and highly cohesive modules
B)tightly coupled and highly cohesive modules
C)loosely coupled modules which are not cohesive
D)tightly coupled modules which are not cohesive
Question
______ describes the ability of a class to derive properties from a previously defined class.

A)Encapsulation
B)Inheritance
C)Polymorphism
D)Information hiding
Question
A(n)______ is a step-by-step specification of a method to solve a problem within a finite amount of time.

A)prototype
B)module
C)solution
D)algorithm
Question
Which of the following is an example of a syntax error?

A)a program encounters an instruction to divide by zero
B)an array subscript in a program goes out of range
C)the beginning of a while loop is written as "whille" instead of "while"
D)an algorithm that calculates the monthly payment of a loan displays incorrect results
Question
User-detected errors are corrected during the ______ phase of the software life cycle.

A)maintenance
B)coding
C)refining
D)testing
E)verification
Question
The first phase of the life cycle of software is the ______ phase.

A)design
B)risk analysis
C)specification
D)coding
Question
With ______,objects can determine appropriate operations at execution time.

A)encapsulation
B)inheritance
C)polymorphism
D)information hiding
Question
The communication mechanisms among modules are called ______.

A)algorithms
B)solutions
C)prototypes
D)interfaces
Question
An instance of a class is known as a(n)______.

A)module
B)object
C)abstract data type
D)data structure
Question
A(n)____ is a collection of data and a set of operations on the data.

A)method
B)exception
C)abstract data type
D)data structure
Question
Object-oriented design identifies objects by focusing on the ______ in the problem statement.

A)nouns
B)verbs
C)adjectives
D)adverbs
Question
A(n)______ is a construct that can be defined to store a collection of data.

A)data structure
B)module
C)abstract data type
D)method
Question
A set of objects that have the same type is called a(n)______.

A)data structure
B)abstract data type
C)module
D)class
Question
Which of the following is an example of a logical error?

A)an algorithm that calculates the monthly payment of a loan displays incorrect results
B)an array subscript in a program goes out of range
C)a program expects a nonnegative number but reads -23
D)the beginning of a while loop is written as "whille" instead of "while"
Question
Self-contained units of code are called ______.

A)modules
B)invariants
C)algorithms
D)exceptions
Question
A(n)______ is a condition that is always true at a particular point in an algorithm.

A)assertion
B)exception
C)constant
D)invariant
Question
The cost of software includes the consequences of the software not behaving correctly.
Question
A(n)______ is a mechanism for error handling.

A)prototype
B)class
C)exception
D)abstract data type
Question
The specifications of a module indicate how that module should be implemented.
Question
A module reacts to an exception that another module throws by ______ the exception.

A)guarding
B)throwing
C)accepting
D)catching
Question
A module indicates that an error has occurred by catching an exception.
Question
During the specification phase of the life cycle of software,the programmer should specify what enhancements to the program are likely in the future.
Question
A prototype program is created during the ______ phase of the software life cycle.

A)design
B)specification
C)coding
D)testing
Question
Which of the following is an example of an error in input data?

A)a program encounters an instruction to divide by zero
B)an array subscript in a program goes out of range
C)an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results
D)a program expects a positive number but reads -23
Question
Which of the following is NOT used to find logical errors?

A)breakpoints
B)watches
C)System.out.println statements
D)exceptions
Question
Coding is a relatively minor phase in the software life cycle.
Question
Syntax errors are corrected during the maintenance phase of the software life cycle.
Question
A programmer can decrease the time needed to develop a program by starting to write the code of the program before creating a solution design.
Question
Logical errors of a program are removed during the coding phase of the software life cycle.
Question
The specifications of a module describe its ______.

A)public view
B)private view
C)methods
D)implementation
Question
During the design phase of the software life cycle,the program is divided into ______.

A)invariants
B)loops
C)modules
D)prototypes
Question
During the ______ phase of the software life cycle,formal methods may be used to prove the correctness of an algorithm.

A)specification
B)verification
C)testing
D)design
Question
Which of the following is NOT a part of the maintenance phase of the software life cycle?

A)correcting user-detected errors
B)adding more features to the software
C)proving the correctness of algorithms
D)modifying existing features of the software to better suit the users
Question
Which of the following is an example of an exception?

A)a statement does not contain a semicolon at the end
B)an array subscript in a program goes out of range
C)an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results
D)a program expects a positive number but reads -23
Question
Abstraction separates the purpose of a module from its implementation.
Question
If two programs perform the same task,then the faster program is always better.
Question
What is the benefit of procedural abstraction?
Question
What are some good guidelines for deciding on a name for a method of a class?
Question
What is an Application Programming Interface (API)? Why is it useful?
Question
What are some ways of finding logic errors?
Question
In a UML diagram,what does it mean if there is an arrow pointing from class A to class B?
Question
What are the four parts necessary to proving that a loop is correctly implemented?
Question
What is a mutator method?
Question
What is an accessor method?
Question
What is meant by procedural abstraction?
Question
List the information provided in a method's postcondition.
Question
What is a prototype program and what is it used for?
Question
What is meant by information hiding?
Question
List the information provided in a method's precondition.
Question
What is a loop invariant?
Question
Name two important features of fail-safe programming.
Question
What are the nine phases of the software life cycle?
Question
What is meant by the object-oriented approach to modularity?
Question
What are some of the questions that must be answered during the specification phase of the software life cycle?
Question
What are the three principles of object-oriented programming?
Question
What are some of the benefits of modularity?
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/60
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: Principles of Programming and Software Engineering
1
A top-down design identifies actions by focusing on the ______ in the problem statement.

A)nouns
B)verbs
C)adjectives
D)adverbs
B
2
The syntax errors of a program are removed during the ______ phase of the program's life cycle.

A)verification
B)coding
C)testing
D)refining
E)maintenance
B
3
The data flow among the modules of a program is specified during the ______ phase of the software life cycle.

A)specification
B)design
C)coding
D)verification
B
4
A statement about a particular condition at a certain point in an algorithm is called a(n)______.

A)base case
B)invariant
C)assertion
D)loop invariant
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
5
Modularity describes a program that is organized into ______.

A)loosely coupled and highly cohesive modules
B)tightly coupled and highly cohesive modules
C)loosely coupled modules which are not cohesive
D)tightly coupled modules which are not cohesive
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
6
______ describes the ability of a class to derive properties from a previously defined class.

A)Encapsulation
B)Inheritance
C)Polymorphism
D)Information hiding
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
7
A(n)______ is a step-by-step specification of a method to solve a problem within a finite amount of time.

A)prototype
B)module
C)solution
D)algorithm
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
8
Which of the following is an example of a syntax error?

A)a program encounters an instruction to divide by zero
B)an array subscript in a program goes out of range
C)the beginning of a while loop is written as "whille" instead of "while"
D)an algorithm that calculates the monthly payment of a loan displays incorrect results
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
9
User-detected errors are corrected during the ______ phase of the software life cycle.

A)maintenance
B)coding
C)refining
D)testing
E)verification
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
10
The first phase of the life cycle of software is the ______ phase.

A)design
B)risk analysis
C)specification
D)coding
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
11
With ______,objects can determine appropriate operations at execution time.

A)encapsulation
B)inheritance
C)polymorphism
D)information hiding
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
12
The communication mechanisms among modules are called ______.

A)algorithms
B)solutions
C)prototypes
D)interfaces
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
13
An instance of a class is known as a(n)______.

A)module
B)object
C)abstract data type
D)data structure
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
14
A(n)____ is a collection of data and a set of operations on the data.

A)method
B)exception
C)abstract data type
D)data structure
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
15
Object-oriented design identifies objects by focusing on the ______ in the problem statement.

A)nouns
B)verbs
C)adjectives
D)adverbs
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
16
A(n)______ is a construct that can be defined to store a collection of data.

A)data structure
B)module
C)abstract data type
D)method
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
17
A set of objects that have the same type is called a(n)______.

A)data structure
B)abstract data type
C)module
D)class
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
18
Which of the following is an example of a logical error?

A)an algorithm that calculates the monthly payment of a loan displays incorrect results
B)an array subscript in a program goes out of range
C)a program expects a nonnegative number but reads -23
D)the beginning of a while loop is written as "whille" instead of "while"
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
19
Self-contained units of code are called ______.

A)modules
B)invariants
C)algorithms
D)exceptions
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
20
A(n)______ is a condition that is always true at a particular point in an algorithm.

A)assertion
B)exception
C)constant
D)invariant
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
21
The cost of software includes the consequences of the software not behaving correctly.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
22
A(n)______ is a mechanism for error handling.

A)prototype
B)class
C)exception
D)abstract data type
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
23
The specifications of a module indicate how that module should be implemented.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
24
A module reacts to an exception that another module throws by ______ the exception.

A)guarding
B)throwing
C)accepting
D)catching
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
25
A module indicates that an error has occurred by catching an exception.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
26
During the specification phase of the life cycle of software,the programmer should specify what enhancements to the program are likely in the future.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
27
A prototype program is created during the ______ phase of the software life cycle.

A)design
B)specification
C)coding
D)testing
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
28
Which of the following is an example of an error in input data?

A)a program encounters an instruction to divide by zero
B)an array subscript in a program goes out of range
C)an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results
D)a program expects a positive number but reads -23
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
29
Which of the following is NOT used to find logical errors?

A)breakpoints
B)watches
C)System.out.println statements
D)exceptions
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
30
Coding is a relatively minor phase in the software life cycle.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
31
Syntax errors are corrected during the maintenance phase of the software life cycle.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
32
A programmer can decrease the time needed to develop a program by starting to write the code of the program before creating a solution design.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
33
Logical errors of a program are removed during the coding phase of the software life cycle.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
34
The specifications of a module describe its ______.

A)public view
B)private view
C)methods
D)implementation
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
35
During the design phase of the software life cycle,the program is divided into ______.

A)invariants
B)loops
C)modules
D)prototypes
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
36
During the ______ phase of the software life cycle,formal methods may be used to prove the correctness of an algorithm.

A)specification
B)verification
C)testing
D)design
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
37
Which of the following is NOT a part of the maintenance phase of the software life cycle?

A)correcting user-detected errors
B)adding more features to the software
C)proving the correctness of algorithms
D)modifying existing features of the software to better suit the users
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
38
Which of the following is an example of an exception?

A)a statement does not contain a semicolon at the end
B)an array subscript in a program goes out of range
C)an algorithm that converts a temperature in Celsius to Fahrenheit displays the wrong results
D)a program expects a positive number but reads -23
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
39
Abstraction separates the purpose of a module from its implementation.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
40
If two programs perform the same task,then the faster program is always better.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
41
What is the benefit of procedural abstraction?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
42
What are some good guidelines for deciding on a name for a method of a class?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
43
What is an Application Programming Interface (API)? Why is it useful?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
44
What are some ways of finding logic errors?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
45
In a UML diagram,what does it mean if there is an arrow pointing from class A to class B?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
46
What are the four parts necessary to proving that a loop is correctly implemented?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
47
What is a mutator method?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
48
What is an accessor method?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
49
What is meant by procedural abstraction?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
50
List the information provided in a method's postcondition.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
51
What is a prototype program and what is it used for?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
52
What is meant by information hiding?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
53
List the information provided in a method's precondition.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
54
What is a loop invariant?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
55
Name two important features of fail-safe programming.
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
56
What are the nine phases of the software life cycle?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
57
What is meant by the object-oriented approach to modularity?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
58
What are some of the questions that must be answered during the specification phase of the software life cycle?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
59
What are the three principles of object-oriented programming?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
60
What are some of the benefits of modularity?
Unlock Deck
Unlock for access to all 60 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 60 flashcards in this deck.