Software Engineering Midterm
Which of the following approaches provides the least amount of fault localization?
Big-bang
Which of the following approaches requires a driver and stubs for each module being integrated?
Big-bang
Which of the following approaches to integration is convenient for small systems, but not appropriate for large systems?
Big-bang
Which of the following approaches requires few or no stubs?
Bottom-up
Which of the following best describes the testing strategy called equivalence partitioning?
Creating test cases so that there is at least one test case for each possible output of the program
The following example is a violation of which SOLID principle. Violation: Requiring that a Square class implements an IShape interface which defines a volume() method.
Interface segregation principle
The following is a description of which SOLID principle. Description: Clients should not be forced to depend upon interfaces that they do not use.
Interface segregation principle
The following is a description of which SOLID principle. Description: Functions that use references to classes must be able to use objects of subclasses without knowing it.
Liskov substitution principle
A software architecture that uses fine-grain, replaceable components could help with which of the following?
maintainability
________ is the git command that merges lines of development together.
merge
The Eclipse IDE is composed of a core system and plug-ins. Which architecture pattern is Eclipse using?
microkernel architecture
Which architecture pattern involves breaking an application into service components of separately deployable units?
microservice
Which architecture pattern uses web-services to expose functionality of components of an application?
microservice
In the MVC architecture pattern, which component manages the system data and associated operations on that data?
model component
Which architecture pattern is used with GUI applications to separate presentation and interaction from system data?
model-view-controller
In a sequence diagram, this fragment type is used to describe an option sequence
opt
________ is a software development technique where developers work in groups of two, checking each other's work and providing the support to always do a good job.
pair programming
A software architecture that localizes critical operations and minimizes communications could help with which of the following?
performance
Which architecture pattern is common in UNIX based systems where the output of one program can be used as input to another program?
pipe and filter
Which architecture pattern is commonly used in data processing applications?
pipe and filter
The ________ is a list of "to do" items that a development team must tackle.
product backlog
The ________ is an individual (or group) whose job is to identify product features or requirements and prioritize these for development .
product owner
________ is the git command that updates the local line of development with updates from its remote counterpart.
pull
________ is the git command that updates the remote repository with any commits made locally to a branch.
push
In a sequence diagram, this fragment type is used to refer to an interaction defined on another diagram
ref
________ is the process of rewriting or editing code so that it is simpler and more maintainable, but still functions the same as before it is edited.
refactoring
Which architecture pattern is used when you have a system in which large volumes of information being generated that has to be stored for a long time?
repository architecture
Which architecture pattern relies on a central store of data as an efficient data sharing mechanism?
repository architecture
________ is the git command that generates a request asking your upstream project to pull changes into their tree.
request-pull
A software architecture that localizes safety-critical features in a small number of sub-systems could help with which of the following?
safety
The ________ is responsible to ensure that the scrum process is followed and guides the team in the effective use of scrum.
scrum master
A software architecture that uses a layered architecture with critical assets in the inner layers could help with which of the following?
security
Which diagram shows the interactions between actors and the system and between internal system components such as objects?
sequence diagram
In Scrum terms, a development iteration is referred to as a ________
sprint
Which UML diagram shows how a system's state changes due to internal and external events?
state diagram
Which of the following diagrams would be best for modeling real-time systems such as controls on a microwave?
state diagram
________ is the git command that shows the status of changes as untracked, modified, or staged.
status
A client-server architecture can be implemented on a single computer.
true
An operating system follows a microkernel architecture pattern.
true
Which diagram shows the interactions between a system and its environment?
use case diagram
Which of the following UML diagrams models behavior of a software system instead of structure?
use case diagram
________ are short, simple descriptions of a feature told from the perspective of the person who desires a capability from a software system.
user stories
________ is an estimate of how much effort a team can cover in a single development iteration.
velocity
In the MVC architecture pattern, which component defines and manages how the data is presented to the user?
view component
________ is the git command that initializes a brand new Git repository and begins tracking an existing directory.
init
What are the 4 + 1 view models of software architecture?
logical view process view development view physical view
In a sequence diagram, this fragment type is used to indicate a fragment that executes multiple times
loop
What is a mock object?
A mock object is a dummy object that mimics the behavior of a real object in controlled ways. We created a mock object for the Dice class.
Which of the following best describes software design patterns?
A solution to a recurring problem which focuses on how to implement part of a software project
In the Zombie game, which of the following pattern was used to make it easier to create new levels for the game?
Abstract factory
Which software design pattern can be used to provide an interface for creating families of related or dependent objects?
Abstract factory
Which of the following levels of testing deals with ensuring that software meets requirement criteria and is ready for release?
Acceptance
In the Zombie game, which of the following pattern was used to make it easier to define new hats for a Zombie?
Decorator
Which design pattern can be used to attach additional responsibilities to an object dynamically?
Decorator
The following example is a violation of which SOLID principle. Violation: In the first version of the Zombie game, the Model has a reference to Zombie instead of Sprite.
Dependency inversion principle
The following is a description of which SOLID principle. Description: High level modules should not depend upon low level modules. Both should depend upon abstractions.
Dependency inversion principle
A "blob class" is an example of a class with high cohesion.
False
The UML diagram depicts the code structure of a Dice Game. (The same example from class.) How would refactor the code so that it is easier to unit test? Why is the refactored code easier to unit test? (To receive full credit, you must describe additional interface, classes, and relations that you would add.)
First, you would create an iDice interface in which the Dice class would implement, and the Game class would be associated to. Then you would create a MockDice class that would "mock" the dice class. This class would also implement the iDice interface. This refactored code is easier to unit test because it allows you to test different cases that could be possible when rolling the dice, without having to modify the dice class. We can now easily "mock" the Dice object. You inject the iDice interface with "real" dice when testing.
Using the terms "driver" and "stub", how can following the dependency inversion principle help a developer write code that is easier to test?
If a developer has a component that uses only interfaces to refer to other parts of the application, stubs can be created to substitute for a real component. Stubs can be used to "mock" the real component. A developer can create a driver that will be used to create an instance of a class and inject the objects into the defined dependencies. This will make the code easier to test.
Referring to the UML class diagram, why is it better for the Controller class to reference an Incrementable type rather than have a reference to a Model type directly?
If you change something in the Model class, you don't have to change the Controller class as well
What are the parts of agile manifesto?
Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan
Which of the following levels of testing deals with verifying the interaction between software components?
Integration
In "Basic MVC Example", which of the following pattern was used to implement the MVC pattern?
Observer
Which design pattern can be used to provide a one-to-many dependency between objects?
Observer
The following example is a violation of which SOLID principle. Violation: In the first version of the Zombie game, the Model could not be extended to work with Werewolf objects without modifying the Model class.
Open-closed principle
The following is a description of which SOLID principle. Description: Software entities such as classes should be extensible without having to rewrite the software entities.
Open-closed principle
The following is a description of which SOLID principle. Description: A class should have only one reason to change.
Single responsibility principle
The following example is a violation of which SOLID principle. Violation: Defining a Rectangle class that has methods for drawing a graphical representation of a rectangle as well as calculating the area of a rectangle.
Single-responsibility principle
In the Zombie game, which of the following pattern was used to make it easier to change the way that a Zombie walks?
Strategy
Which design pattern can be used to encapsulate an algorithm?
Strategy
Which of the following levels of testing deals ensuring that no new bugs were introduced into working code by a change?
System
Which of the following levels of testing deals with testing the behavior of a software product or service as a whole?
System
Referring to the UML class diagram, explain all of the relationships between the Model class, the Incrementable interface, and the Controller class in detail.
The Model class implements the Incrementable interface. The Controller class is associated to 0 or more incrementables. Controller has-a incrementable
Which of the following approaches requires few or no drivers?
Top-down
Cohesion measures how functionally related the operations of a software element are.
True
Which of the following levels of testing deals with testing individual modules such as a single class?
Unit
Which of the following levels of testing uses assert methods to automate testing of classes or methods?
Unit
Which UML diagram shows the actions involved in a process or in data processing?
activity diagram
Which of the following diagrams would be best for modeling business processes?
activity diagram
________ is the git command that stages a change.
add
In a sequence diagram, which of the following fragment types could best represent a logical branch (such as an "if ... else" statement)
alt
A software architecture that includes redundant components and mechanisms for fault tolerance could help with which of the following?
availability
________ is the git command that shows the branches being worked on locally.
branch
Which show the object classes in the system and the associations between these classes?
class diagram
________ is the git command that creates a local copy of a project that already exists remotely.
clone
________ is the git command that saves the snapshot to the project history and completes the change-tracking process.
commit
In the MVC architecture pattern, which component manages user interaction (e.g., key presses, mouse clicks, etc.)?
controller component
A software architecture is usually determined at the end of a software project to help document the software created.
false