[Skip Breadcrumb Navigation]
:
[Skip Breadcrumb Navigation]
Home
Student Resources
Quizzes
Chapter 20
Chapter 20
Patterns and UML
This activity contains 10 questions.
Patterns and UML are:
Elements of the Standard Template Library in C++.
Extensions of C++ that support methods for iteration and connecting classes.
A programming language separate from C++ that is often used with Object Oriented design.
Object Oriented design techniques that are independent of any programming language.
Which pattern provides consistency in how to cycle through the manipulation of items in a vector, list, queue, map, or set?
Model-View-Controller pattern
Observer/Observable pattern
Adapter pattern
Container-Iterator pattern
Which pattern could be used to transform a vector into a set through a new interface.
Model-View-Controller pattern
Observer/Observable pattern
Container-Iterator pattern
Adapter pattern
Which of the following is
not
one of the design principles behind the Model-View-Controller pattern?
The controller relays commands between the model and user.
The model is used to store the data structure and key algorithms used in the application.
The view might be a GUI display that is generally read-only.
The model and view should be well-integrated to improve efficiency.
If we used the quick-sort algorithm presented in the textbook then which array would result in the worst runtime performance?
int sampleArray[] = {1,2,3,4,5,6,7,8,9,10};
It does not matter what values are stored in the array. The quicksort algorithm will always require O(n log n) time.
int sampleArray[] = {5,3,1,2,4,7,9,8,10};
int sampleArray[] = {3,8,5,1,2,10,7,9,6,4};
What is an appropriate level of abstraction for designing a sorting pattern?
A specification of the desired input and output only.
The algorithm for recursively dividing and conquering the data to be sorted.
How to select an appropriate element from the array for splitting.
Whether the internal data structure will be composed of an array or a vector.
Which of the following best describes the Unified Modeling Language?
UML is an object-oriented programming language.
UML is an extension of C++ that supports software design.
UML is a pseudo-code-style language used to describe algorithms.
UML is a graphical representation system for program and software design.
These devices are the closest predecessors to today's UML.
Flowcharts, structure charts, hierarchy charts
Design patterns
Procedural programming
pseudocode
In the following UML Class Diagram object, which member functions and member variables are public?
Animal
-name: string
-age: int
+getDescription(): string
+setAge(int a): int
-calcInfo(): string
name, age
name, age, calcInfo
getDescription, setAge, calcInfo
getDescription, setAge
How are the interactions between classes depicted in UML?
Additional fields are added to the textual description inside the box representing a class. These fields indicate what other classes relate to the existing class.
The boxes representing classes are connected using a variety of annotated arrows to indicate ISA, HAS-A, and other types of relationships.
A separate pseudo-code style document is produced that describes all of the class interactions.
This is unspecified; the user is allowed to extend UML in any way to capture the class relationships.
The Submit Answers for Grading feature requires scripting to function. Your browser either does not support scripting or you have turned scripting off.
So, the Submit Answers for Grading button below will not work.
The following Submit Answers for Grading button is provided in its place and will clear your answers:
The Clear Answers and Start Over feature requires scripting to function. Your browser either does not support scripting or you have turned scripting off.
So, the Clear Answers and Start Over button below will not work.
The following Clear Answers button is provided in its place and will clear your answers:
Your browser either does not support scripting or you have turned scripting off. Because of this, the answer choices will NOT appear in a different order each time the page is loaded, though that is mentioned below. Note that you do not need this feature to use this site.
Answer choices in this exercise appear in a different order each time the page
is loaded.
Copyright © 1995 - 2010
Pearson Education
. All rights reserved. Pearson Addison Wesley is an imprint of
Pearson
.
Legal Notice
|
Privacy Policy
|
Permissions
[Return to the Top of this Page]
: [Return to the Top of this Page]