0% found this document useful (0 votes)
177 views49 pages

ыфыфыф

The document covers a review of object-oriented design topics including characteristics of good software design, the design process, conceptual design techniques like use cases and CRC cards, object-oriented programming principles like abstraction and encapsulation, relationships between classes, and modeling techniques.

Uploaded by

daryn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
177 views49 pages

ыфыфыф

The document covers a review of object-oriented design topics including characteristics of good software design, the design process, conceptual design techniques like use cases and CRC cards, object-oriented programming principles like abstraction and encapsulation, relationships between classes, and modeling techniques.

Uploaded by

daryn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Object-Oriented Design

Module 1 Review
1. Which of these are desirable characteristics of a software design? Choose the three
correct answers.
maintainability
flexible
reusability
2. Identify two outcomes of the design process. Choose the two correct answers.
conceptual design
technical design
3. You are writing out a CRC card for a bank machine component. Under which section
should you put "Track Cash Remaining."
Responsibility
4. Which two of these are likely to be a part of conceptual design?
Mockups
CRC Cards
5. When during the design process are you likely to produce CRC cards the most?
conceptual design
6. Which of the following are examples of non-functional requirements? Choose the three
correct answers.
availability
security
performance
7. Select the three categories of objects generally present in object-oriented software.
control
entity
boundary
8. An object which is responsible for showing data to the user could be considered which
category of object?
boundary
9. You are planning a Professor class as part of your software design. Which of these will
you consider a collaborator ? Choose the two correct answers.
Student
Course
10. What is a requirement of this form called? "As a ____, I want to ____, so that ____".
user story
11. You are a programmer creating software for a bank machine system. Which section of a
CRC card for the bank machine component will the "User" go into?
Collaborator
12. During conceptual design, you will talk about... (Choose the three correct answers):
requirements
mockups
tradeoffs

Module 2 Review
1. Some of the earliest computing languages supported:
main program and subrout
2. What are some advantages of object-oriented programming in a language like Java?
Choose the three correct answers.
mimic the real-world structure of the problem
data management
abstract data types
3. Sam was asked to create a DeliveryDriver class. Sam thought about the problem, and
reduced it to its most essential aspects… things like takeOrder, DeliveryArea, etc. She
ignored things that were not important in the context, like the driver's height or eye
colour. She just applied an important object-oriented design principle. Which of these
concepts best describes what she just did?

abstraction
4. Sam identified the important attributes and behaviours of a delivery driver and put them
all into a DeliveryDriver class, like "takeOrder", "deliverOrder", and "DeliveryArea." She
exposed some of these to other classes. She just demonstrated an important part of object-
oriented design. Which of these concepts best describes what you did?
encapsulation
5. Sam decided that the DeliveryDriver class was getting too complex, so she split it up,
moving its behaviour into several related classes, like DeliveryCar and DeliveryOrder.
She just demonstrated which important object-oriented design principle?
decomposition
6. Sam realized that her DeliveryDriver class had some behaviour and attributes that could
be shared by other classes, like BusDriver and TaxiDriver, so she made a class called
Driver that these classes inherited behaviour from. Which object-oriented design principle
did she use?
generalization
7. Which keywords allow your classes to achieve polymorphism in Java? Choose the two
correct answers.
extends
implements
8. Which is the proper way to show inheritance in a UML class diagram? Choose one of the
four options below:

c)
9. Which is the proper way to show an abstract method in a UML class diagram?
anOperation()
10. Which UML class diagram is a good example of encapsulation? Choose one of the four
options below:
b)
11. Add the necessary keyword to complete this instance variable declaration in a class if you
are using the encapsulation design principle to hide this variable from all other classes:
______ String message;.
private
12. There are three different relationships that objects can have. Which of these best describes
the relationship between a Chair and its Legs?
composition

Module 3 Review
1. Which of these terms are used to describe coupling? Choose the 3 correct answers.
ease
degree
flexibility
2. Which is the most desirable?
high cohesion, loose coupling
3. What are some keywords you might use for information hiding in Java? Select the three
correct answers.
[none]
private
protected
4. What are the best ways to promote Conceptual Integrity in your software? Choose the two
correct answers.
Planning the architecture of the system
Regular code reviews
5. Information Hiding is closely related to one of the core design principles of object-
oriented design. Which one?
encapsulation
6. Which of these sequence diagrams is correct?
b)
7. What are elements of a state in a State diagram (see diagram)? Choose the three correct
answers.

activities
state name
state variables
8. When is Model Checking conducted?
After development
9. What are the phases of Model Checking? Choose the 3 correct answers.
Running Phase
Analysis Phase
Modeling Phase.
10. During model checking, what is the name for a violation of the desired properties of the
model?
Counterexample
11. When two processes cannot run because they are waiting on the same resource, it's
called…
Deadlock
12. Choose the three examples of inheritance used poorly:
A subclass inherits methods from the superclass and adds extra, new, unrelated
functionality
A method in the superclass is overwritten with different behaviour by a subclass.
Inheritance is used to share behaviour without specializing

Final Exam
1. The first stage of the two-stage design process is _______ design.
Hint: This stage has activities like creating CRC cards, talking with the customer about
their requirements, and creating mockups.
conceptual
2. What The second stage of the two-stage design process is ________ design.
Hint: This is when you will define the structure of the code and start turning your
mockups into classes.
defining / define
3. Which of these conceptual design techniques will help you analyze the problem space to
determine classes for your object-oriented software? Choose the two correct answers.
mockups
CRC
4. During conceptual design, once the problem is mapped into components, what are the
other two critical pieces of information that you must specify for these classes or
components? Choose the two correct answers.
collaborators
responsibilities
5. You are writing the CRC card for a Bear component. Choose the two responsibilities.
eat berries
hunger
6. You are writing the CRC card for a Bear component. Choose the three collaborators.
tree
bear
den
7. You create an object that represents a user, storing important information about them such
as their preferences. What kind of object is this?
entity
8. You create an object that represents a dialog box. It creates buttons and text fields, etc, for
the user to interact with, and it logs those interactions. What kind of object is this?
boundary
9. You create an object that compares values from two different sources. It then updates the
smaller value to be equal to the larger one. What kind of object is this?
control
10. Which of these is an example of a quality tradeoff?
Adding security knowing it will reduce speed
11. What is the term for reducing a class or object to its inputs and outputs in modelling?
black box thinking
12. Which one of these classes is in most need of being decomposed?
Store
13. In order to provide good encapsulation, fill-in-the-blanks on this UML class diagram:
(Replace the underscores _ from top to bottom with minus signs ("-") or plus signs ("+");
your answer will be a string of six + or - signs with no spaces)
--++++
14. You are writing a simple soccer video game. Select the best example of proper
abstraction:
a)
15. Which design principle enables developers to follow the guideline D.R.Y. ("Don't Repeat
Yourself"):
generalization
16. Which of these UML class diagrams shows an association relationship?
b)
17. Which of these UML class diagrams depicts an aggregation ("has-a") relationship
between the two classes?
a)
18. Which of these UML class diagrams depicts a composition, or a strong "has-a"
relationship?
d)
19. Select the object pairing that has an association relationship:
Hiker - Trail
20. Select the object pairing that has an aggregation relationship:
Stapler - Staple
21. Select the object pairing that has a composition relationship:
Book - Page
22. Choose the two answers that correctly complete the following sentence:
"We say that a class has low cohesion if..."
...its purpose is unclear.
...it tries to encapsulate too many unrelated responsibilities.
23. Two classes are tightly coupled. What are some ways you might be able to tell? Choose
the two correct answers.
They are very highly reliant on each other
In order to understand one class, you need to open up the other to look at the
implementation
24. How can you apply the principle of Separation of Concerns in object-oriented
programming?
Separate objects or components according to their role in the software
25. Which of these violates Liskov's Substitution Principle?
an operation in the superclass is replaced by a different operation in the subclass
26. For which of these situations would you use a sequence diagram?
To show the collaborative behaviour of objects in your program.
27. Choose the correct state diagram for a car which has a state called "HasGas:"

c)
28. Which of these elements represents a termination in a UML State diagram?
a)
29. What is the purpose of model checking?
To check the software for errors before release
30. What is an abstract data type?
a type of data defined by the developer rather than the language.

Design Patterns
Module 1 Review
1. When is the best time to use a design pattern? Choose two answers.
For a commonly-encountered issue.
When explaining a solution to your fellow developers
2. What is the purpose of the Singleton pattern? Select the two correct answers.
to provide global access to an object
to enforce instantiation of only one object of a class
3. What does it mean to "let the subclass decide" in the Factory Method Pattern?
the subclass defines the methods for concrete instantiation. As such, the type of
object is determined by which subclass is instantiated.
4. What do we call the creation of an object, for example, with the 'new' operator in Java?
concrete instantiation.
5. What are the advantages of the Facade pattern? Select the three correct answers.
The client and the subsystem are more loosely coupled
The complexity of the subsystem is hidden
The Facade class redirects requests as needed
6. Which of the following diagrams shows the Adapter pattern?
c)
7. Which of these are the best applications for a Composite Pattern? Choose the three
correct answers.
Elements in a user-interface dialog
Music in a playlist
Files and folders
8. Which of these is NOT a common application of the Proxy Pattern?
information proxy
9. How does a Decorator Pattern work? Choose one.
builds a behaviour by stacking objects
10. What are the object types that are used in the Composite Pattern? Select the two correct
answers.
composite
leaf
11. Many different clients need to create a similar object. You would like to outsource this
concrete instantiation to a dedicated class. Which technique will you use, in one word?
Factory
12. How do you enforce the creation of only one Singleton object? Select the two correct
answers.
Write a method that can create a new Singleton object or return the existing one.
Give the Singleton class a private constructor

Module 2 Review
1. Choose the most appropriately implemented Template pattern.
Some UML reminders that will help you:
1. a private method or variable is denoted by a - as in -boilWater().
2. a method, variable, or class that is abstract is denoted by italics (as in
PastaTemplate)
d)
2. What is the correct situation for the use of a Chain of Responsibility pattern?
You have multiple potential handlers, but only one will deal with the request.
3. What is the purpose of encapsulating state in an object in the State Pattern? Choose the
three that are correct.
it turns the context into a client of the state.
it allows the current state object to decide how to achieve behaviours specific to
the state of the context.
it removes large conditionals that are difficult to maintain.
4. What design principles is the Command Pattern using?
Encapsulation, generalization, loose coupling
5. Which are the minimum requirements of the Observer pattern? Choose the three that are
correct.
update method in observers
method to notify observers
methods to add or remove observers
6. When are you most likely to need a Mediator pattern?
When you are coordinating the activities of a set of related classes.
7. Marlon is coding part of the software that follows a similar sequence of steps. Depending
on the type of object, these steps will be implemented in slightly different ways, but their
order is always the same. Which design pattern could Marlon use?
Template pattern
8. What are the important roles in the Command Pattern?
Command, Receiver, Invoker
9. Select the best UML class diagram representation of the Chain of Responsibility pattern.
b)
10. You have a machine performing a complex manufacturing task, with different sensors
and different components of the machine represented by different classes. Which design
pattern will you use to arrange the parts?
Mediator
11. You have a security system class, and it has 3 modes: normal, lockdown, and open.
Which pattern would you use to model the behaviour in these different modes?
State
12. One of your classes represents a mailbox, while another is the owner of the mailbox. The
person would like to know when new mail arrives. Which design pattern will you
probably use?
Observer

Module 3 Review
1. What does MVC Stand for? Use spaces between each word, no upper case letters, and no
punctuation.
model view controller
2. Select the two elements of the open/closed principle:
Open for extension
Closed for modification
3. What is the best description of the Dependency Inversion principle?
Client objects depend on generalizations instead of concrete objects.
4. Which of these statements is true about the Composing Objects principle?
it provides behaviour with aggregation instead of inheritance
it leads to tighter coupling
The first statement is true
5. Which of these UML diagrams demonstrates the Interface Segregation principle?
d)
6. Which of these code examples violates the Principle of Least Knowledge, or Law of
Demeter?
public class O {
M I = new M();

public void anOperation2() {


this.I.N.anOperation();
}
}
7. How can Comments be considered a code smell?
Excessive commenting can be a coverup for bad code
8. What is the primitive obsession code smell about?
Overuse of primitive data types like int, long, float
9. You have a class that you keep adding to. Whenever you add new functionality, it just
seems like the most natural place to put it, but it is starting to become a problem! Which
code smell is this?
Large Class
10. Why is it important to avoid message chains whenever possible?
The resulting code is usually rigid and complex.
11. Look at the code snippet. Which code smell do you detect?
public class Class1 {

...

public void M(Class2 C) {


C.doSomething(x);
C.foo(y);
C.foo2(z, i);
}
}
Feature Envy
12. Joseph was developing a class for his smartphone poker game, and decided that one day
he would like to be able to change the picture on the backs of the cards, so he created a
Deck superclass. Since his app does not have that feature yet, Deck has only one subclass,
RegularDeck. What code smell is this?
Speculative Generality

Final Exam
1. Mohsin needs to create various user objects for his University learning platform. What is
the act of creating an object called?
concrete instantiation
2. Mohsin has a superclass that performs various operations on these user objects - Student,
Professor, Assistant, for example. He wants the subclass to determine which object is
created. This is sketched below in a UML diagram for the StudentUser class. What is this
design pattern called?
Factory Method Pattern
3. Select the correct UML class diagram representation of the Composite Pattern:
d)
4. Yola is programming for a grocery store system. She has a complex SalesData class that
updates inventories and tracks sales figures, and a lightweight AccessSales class that will
give select sales data to a user, depending on their credentials. AccessSales delegates to
SalesData when more complex data is needed. This situation is shown below. Which
Pattern is this?
Proxy Pattern
5. Which of these UML class diagrams shows the Facade pattern?
c)
6. What is the difference between the Factory Method and a Simple Factory?
In Factory Method, concrete instantiation is done in a designated method, where
a Simply Factory creates objects for external clients
7. José wants to build behaviours by stacking objects and calling their behaviours with an
interface. When he makes a call on this interface, the stack of objects all perform their
functions in order, and the exact combination of behaviours he needs depends what
objects he stacked and in which order. Which Design Pattern best fits this need?
Decorator Pattern
8. You need to connect to a third-party library, but you think it might change later, so you
want to keep the connection loosely coupled by having your object call a consistent
interface. Which Design Pattern do you need?
Adapter
9. Which of these diagrams shows the State pattern?
b)
10. Which of these design principles best describes the Proxy pattern?
encapsulation, because the Proxy hides some of the detail of the subject
11. Ashley has a method in her class that needs to makes a request. This request could be
handled by one of several handlers. Which design pattern does she need?
Chain of Responsibility
12. Colin is designing a class for managing transactions in software for a banking machine
software. Each transaction has many of the same steps, like reading the card, getting a
PIN, and returning the card. Other steps are particular to the type of transaction. Which
pattern does he need?
Template
13. Which of these is NOT a good use of the Command pattern?
Sending a command to a third-party service or library
14. Choose the correct UML class diagram representation of the Observer pattern:
d)
15. Which code smell may become a problem with the Mediator design pattern?
Large Class
16. Hyun-Ji is developing a program. She wants to create a Student class that behaves
differently based on if the student has not registered for classes, is partially registered,
fully registered, or fully registered and paid. Which design pattern does she need?
State
17. Which of these methods is found in a typical Observer class?
update()
18. Fernando is making pizza objects with the Template Method pattern. The make() function
is the whole process of making the pizza. Some steps are the same for every pizza -
makeDough(), and bake(). The other steps - addSauce(), addToppings() and addCheese()
- vary by the pizza. Which of these subclasses shows the proper way to use a template
method?

b)
19. In the Mediator Pattern, which pattern is often used to make sure the Mediator always
receives the information it needs from its collaborators?
Observer
20. In the MVC Pattern, which of these is usually made into an Observer?
View
21. Which of these answers does NOT accurately complete the following sentence? “A class
is considered closed to modification when…”
...its collaborators are fixed
22. How does the Dependency Inversion Principle improve your software systems?
Client classes become dependent on high level generalizations rather than
dependant on low level concrete classes
23. Allison has a search algorithm, and she would like to try a different implementation of it
in her software. She tries replacing it everywhere it is used and this is a huge task! Which
design principle could Allison have used to avoid this situation?
Dependency Inversion
24. Which of the code smells is shown in this code example of a method declaration?
private void anOperation(String colour, int x, int y, int z, int speed)
Large Parameter List
25. Which object-oriented design principle do Long Message Chains, a code smell, usually
violate?
Principle of Least Knowledge / Law of Demeter
26. Which code smell can you detect here?
public class Person {
int age;
int height;
String hairColour;

public int getAge() { return age; }


...

}
Data Class
27. What are the components of the MVC pattern?
Model, View, Controller
28. The interface segregation principle encourages you to use which of these object-oriented
design principles? Choose the 2 correct answers.
decomposition
abstraction
29. Interface Segregation is a good way to avoid which code smell? Choose the best possible
answer.
Refused Bequest
30. Which of these statements about the Decorator pattern are true?
The decorator classes inherit from the basic object which is being decorated
Decorator objects can be stacked in different order
The second statement is true

Software Architecture
Module 1 Review
1. Read the following statements. Which of them are true?
Project managers are stakeholders in the architecture
End users are stakeholders in the architecture
Both statements are true
2. Which of these UML diagrams might be useful for the logical view of a system? Select
the 2 correct answers.
Class diagram
State diagram
3. You need to show how your software elements are mapped to hardware nodes and
execution environments. Which view do you need?
physical view
4. William is drawing out a component diagram. One of his classes needs an interface from
another component. Which of these connectors should he use on the component that
needs an interface from another component?

d)
5. Cécile is putting together a Package diagram. How can she show that a package has an
interface? Select the 2 correct answers.
b)
d)
6. What is the name for a physical result of the development process, such as an executable
file?
artifact
7. Which of these sets of keywords might be used on the lines in package diagrams?
merge, access, import
8. How is a hardware device shown in a deployment diagram?
c)
9. What kind of UML diagram is shown here?
Activity diagram
10. Which of these is NOT shown on an activity diagram?
interfaces
11. What does the component of ‘component diagram’ refer to?
an independent, encapsulated unit in the system.
12. The "+1" in Kruchten's 4+1 View Model refers to a scenario. What is a scenario?
a representation of a normal use case.

Module 2 Review
1. If you have a program language that is largely procedural, which architecture style are
you likely to use?
Main Program and Subroutine
2. What are some disadvantages of Data-Centric Architecture? Select the 2 correct answers.
The system becomes heavily reliant on the central data.
The existing data schema is difficult to change.
3. Which of these principles is NOT characteristic of a layered system?
tight coupling
4. Which of the following is a common messaging pattern in client/server relationships?
request-response
5. How does an n-Tier architecture differ from a layered architecture?
The interaction between tiers in an n-Tier architecture is strictly message based
6. Which of these is NOT a possible use for Interpreters?
Enhancing resource usage efficiency
7. Which of these is an advantage of event-based architecture?
Event generators and event consumers are loosely coupled
8. There is a common technique that is used in event architectures to indicate whether or not
a particular resource is being accessed by another process at that moment. What is it
called?
semaphore
9. Beverly is asked to develop a way to control a process. There is a device to measure the
height of liquid in a tank, and when the tank is almost full, a pump turns on to empty the
tank. Which type of process control architecture will she use?
Feedback Loop
10. What are the steps in complex, process control system architectures, such as self-driving
cars?
monitor, analyze, plan, execute
11. Which of these applications would be best suited to a procedural programming paradigm,
such as the Main Program and Subroutine architecture?
Analyzing data and producing reports
12. Which of these is NOT an advantage of pipe and filter architectures?
Data transformation is computationally efficient

Module 3 Review
1. Identify the attribute refinements of a system's performance. Select the 2 correct answers.
throughput
latency
2. Guidelines such as "the system should be easy and intuitive to learn", "the system should
minimize user errors," and "the system should make it easy for users to complete tasks"
fall under which category of quality attribute?
usability
3. Calum is leading a team of developers and would like to promote conceptual integrity.
Which of these is NOT a way he could promote conceptual integrity:
Split the development team into subteams for each component of the architecture
4. Have a look at this diagram of a quality attribute scenario:

[Q4] is a condition that will cause the system to respond. What is this called?
stimulus
5. Let's look at the same diagram of a quality attribute scenario:

[Q5] is the part of the system affected by the stimulus. What is this called?
artifact
6. Which of these could be considered under the environment in a quality attribute scenario?
recovering from error
7. Who are the three main groups of people involved in the architecture tradeoff analysis
method?
evaluation team, project decision makers, architecture stakeholders
8. Leon is analyzing the architecture and notices that under conditions of high numbers of
users signing on at the same time, there is a potential that one of the architecturally
significant requirements (ASRs) will not be met. What is this called?
risk scenario
9. Maddie's software team is split into two subteams working on two different components
that work together. These teams share one large room and are in constant contact.
According to Conway's Law, what could happen if Maddie does not physically separate
the two subteams?
The components they produce will be very tightly coupled
10. This is one of the styles of implementing variations. What is it called?
adaptation
11. Which of these is NOT a typical advantage of developing a product line?
greatly reduced up-front development
12. Andy is planning the development of a product line of eBook readers and he has to
categorize the components that will be handled by each team. There is one product in the
line which has a backlight for reading during the night. In the development process,
where would you categorize this feature?
product-Specific

Final Exam
1. Which of these views show the functional design of the software, usually in the form of
objects and the relationships between them?
logical view
2. Which of these UML diagrams are likely to be part of the process view? Select two
correct answers.
Sequence diagram
Activity diagram
3. To which view would the Package Diagram belong? Remember that a package diagram
shows the packages that make up a software and how they are related.
development view
4. Which of these statements about Component Diagrams is true?
They clarify dependency relationships
5. Which of these Package Diagrams is invalid?

c)
6. Which of these will you NOT find in a deployment diagram?
class
7. Which of these diagrams correctly shows a component?
a)
8. Which of these does NOT belong on an activity diagram?
b)
9. What is an artifact?
A physical realization of a software component
10. What is an abstract data type?
a data schema that is defined by the developer
11. Which of these are advantages of main program and subroutine architectural style? Select
two correct answers.
promotes function modularity and reuse
efficient for computation focused problems
12. Which of these accurately represents basic Database Architecture?
c)
13. Select the one accurate statement about layered architecture:
Layered architecture is often based on layers of abstraction
14. What is the correct term for a machine that hosts a server?
server-host
15. Some programs allow users to record a sequence of inputs - for example keyboard and
mouse inputs - to run later. What are these called?
macros
16. Data Flow Architecture is also called...
Pipe and Filter Architecture
17. Which of these is NOT a common component of event-driven architectures?
event processor
18. Which type of process control that we discussed is typically needed for complex systems?
MAPE-K
19. Which of these is a drawback of n-Tier architecture?
Every tier demands extra resources to manage the client/server relationships
20. Which of these is NOT an example of Interpreter type architecture?
The kernel of an operating system
21. Which of these terms matches this definition: “The amount of time the system is
operational over a set period of time?”
availability
22. Which of these quality attributes is most important from the developer's perspective?
flexibility
23. [Q23] could be described as: “how the artifact will behave as a result of receiving a
stimulus.” What is this called?

response
24. [Q24] could be described as: “the mode of the system when it receives a stimulus.” What
is this called?

environment
25. General quality attributes like performance and security have more specific components
like throughput and latency for performance. What are these called?
attribute refinement
26. Which strategy is NOT part of delivering a high-quality system?
Treat all quality attributes as equally important
27. True or False: You should focus on situations that are outside the normal execution path
when building a quality attribute scenario.
True
28. "Maintenance Downtime" is an attribute refinement of what quality attribute?
Availability
29. Eliza is planning a product line of media boxes. Some of these will connect to traditional
television lines, whereas others will only have internet media like video-streaming
services. What is this type of difference between products called?
Variation
30. Mozilla Firefox and other browsers have ecosystems of add-ons for their browsers that
add functionality, for example by blocking ads or providing tools for online shopping.
What is this style of variation called?
Extension

Service-Oriented Architecture
Module 1 Review
1. You are probably using the internet to do some of your personal banking. There is a page
that shows your accounts and their balances, often called something like "Account
Summary" or "Account Overview." You must click on an account to begin managing it.
Which type of web page is this?
dynamic web page
2. Another web page allows interacting with a spreadsheet in a browser. You can enter in
values, sum them up, perform operations on them, format them, etc. What type of web
page is this?
web app
3. Consider the two statements. Choose the one correct option.
JSON is a markup language
JSON can easily be converted into a Javascript object
Only the second statement is correct
4. Which of these is NOT a basic standard of the World Wide Web?
FTP
5. There is an HTTP method that allows you to send, create or update a resource, but allows
the server to decide its location and identity. Which HTTP method is this?
POST
6. Which of these is often used to add dynamic content to a web page?
Javascript
7. What are the three high-level components involved in a remote procedural call?
client, server, interface definition language
8. The process of establishing a connection between the client stub and server stub is
called…
binding
9. What are the advantages of Common Object Request Broker Architecture (CORBA)?
Choose the two correct answers.
It allows for object-oriented paradigms in distributed computing
Objects are essentially independent of their physical or virtual location.
10. Which of these are desirable characteristics of a web service? Select the three correct
answers.
modular
composable
platform-independent
11. Which of these responsibilities does the client stub have in a middleware-based
architecture that uses RPC? Choose the three correct answers.
Formatting and encoding data into standardized messages
Invoking the remote procedure call over the network
Establishing a connection with the server
12. What is the main difference between a web service and a web application?
Web applications are presented through a browser

Module 2 Review
1. What standard is used for all aspects of web service development in this module, from
describing interfaces to publishing and discovering services?
XML
2. What are the two major styles of SOAP requests?
document style
RPC style
3. Which of these message patterns are typical of asynchronous messaging? Choose two
correct answers.
notification
one-way
4. Your web browser has an add-on that is alerted when your favourite blog has a new post.
Which messaging pattern is this?
notification
5. An important part of a WSDL (Web Service Description Language) file is a section that
describes how services are invoked. For example, this section includes the style of
interaction (document or RPC), the transport protocol, and how messages are turned into
XML. What is this section?
bindings
6. Consider the two statements. Choose the one correct option.
SOAP messages can only be sent over HTTP
Every SOAP message needs a header
Neither statement is true
7. Consider the two statements. Choose the one correct option
WSDL can be used to describe non-XML based web services
A WSDL document can import other WSDL documents to gain access to their
specifications
Both statements are true
8. UDDI covers two aspects of web service development. Which ones? Choose the two
correct answers.
discovery
publishing
9. The green pages of UDDI contain which data structures? Choose the two correct answers.
tModel
bindingTemplate
10. Consider the following two statements. Choose the one correct option
Binding to a service is usually a run-time activity
UDDI uses web services for publishing and discovering
Only the second statement is true
11. WS-BPEL covers what aspect of web services?
composition
12. Which part of a WSDL 2.0 description gives concrete information about the ports to be
used for the service?
services

Module 3 Review
1. REST uses several HTTP methods to communicate. Which HTTP method should not
make a change to data on the server?
GET
2. Which of these are constraints of REST architectures? Choose the three correct answers.
Uniform interface for communication
Clients can cache responses
Layered and client-server based
3. According to REST best practices, where should you specify what format the input and
output messages are in?
HTTP headers
4. Which of these are acceptable REST URIs according to best practices? Choose the two
correct answers.
/students/
/students/3/
5. Which of these is NOT used in developing RESTful web services?
SOAP
6. By convention, which HTML method is usually used to create a new resource?
POST
7. What is the recommended way to not break functionality if your RESTful API is being
used by many users?
version your API
8. Which of these best describes microservices?
a variation of SOA applied on an application scale
9. Consider the two statements. Choose the one correct option.
Microservices must be in the same language and framework
Microservices can be replicated for scaling
Only the second statement is true
10. Which are the advantages of microservices? Choose the two correct answers.
Small teams can develop microservices quickly
Services can be scaled independently
11. How can you pass parameters in a REST call? Select the two correct answers.
In the URL
In XML
12. Consider the following two statements about RESTful web services. Choose the one
correct option
Requests can be sent in simple text
PUT is usually used to create new resource
Only the first statement is true

Final Exam
1. Marlon is creating a web page. It's a simple page, which has a list of his current projects,
a short bio about himself, and some GIF images of some of those same projects that he
uploaded to the server himself. What type of web page is this?
static web page
2. Which of these examples is a web application?
online poker
3. Which of these formats can be used to express and structure content to be sent over the
internet? Choose the three correct answers:
JSON
XML
HTML
4. What are the essential parts of an HTTP request? Choose the three correct answers.
a blank space
request-line
headers
5. Which of these are essential parts of an HTTP server response? Choose the two correct
answers.
headers
status-line
6. Consider the following two statements about Javascript. Choose the one correct option.
It can allow you to generate content within the browser
A Javascript file must be sent in addition to an HTML file
Only the first statement is true
7. What is the term for the action that converts the parameters into a standardized message
on the client side?
marshalling
8. Consider the following two statements about middleware and RPC. Choose the one
correct option.
RPC (Remote Procedure Call) is a form of middleware
The IDL (Interface Definition Language) is responsible for generating stubs
Both statements are true
9. Which of these can be found in Common Object Request Broker Architecture (CORBA)?
Choose the three correct answers.
facilities
interface definition language
object request broker
10. What are some disadvantages of CORBA? Choose the two correct answers.
Implementation is difficult
Objects are always called remotely
11. In what format are SOAP messages represented?
XML
12. Which part of a SOAP message can be included but is NOT required?
header
13. True or False: a SOAP message must be sent over HTTP.
False
14. Which type of description will a service requester need to bind to a web service?
WSDL
15. Which section of WSDL 2.0 contains concrete information like physical ports and
mapping interfaces to endpoints?
services
16. What does the types section of a WSDL 2.0 document allow developers to do?
Define abstract data types
17. Which aspects of web services does UDDI allow you to implement? Choose the two
correct answers.
publication
discovery
18. In which section of a UDDI description will you find information like the category of
business and service?
yellow pages
19. Under which data structure of UDDI will you find a reference to the WSDL description?
tModel
20. What is the difference between coordination and composition in the context of services?
composition exposes a combination of services as another service
21. Consider the following two statements. Choose the one correct option.
WS-BPEL only allows you to compose services out of basic services.
WS-BPEL has other features such as conditional logic and the ability to store state.
Only the second statement is true
22. What does it mean that RESTful services are cacheable?
the client can store a version of the server's response
23. Which of these formats can be used within the invocation of a REST service? Choose the
three correct answers.
XML
simple text
JSON
24. Which of these is a good name for a REST resource? In other words, which of these
resource names follow best practices? Choose the two correct answers.
/cars/2/tires
/cars/2
25. You received an HTTP status code 201 from the server, which means that a resource was
created. In a well-designed REST service, which HTTP methods did you send to the
server?
POST
26. Which of these elements in the HTTP header of a request specifies the format of the
response?
Accept:
27. What is the most important difference between WS*-style web services (which utilize
SOAP, WSDL, etc.) and RESTful web services?
RESTful services are simpler
28. Where are the formats of the input and output data specified, according to REST best
practices?
In the HTTP header
29. What are some advantages of microservices architecture? Select the two correct answers.
Scaling through replication
Services can be developed in different languages
30. Consider the following two statements about microservices architecture. Choose the one
correct option.
Communication between microservices is stateless
Testing microservice architecture is complex
Both statements are true

You might also like