CpSc 372
Exam 3
Name______________________________________________
Answer any FOUR of the five questions. Place a large X on
the question you are omitting. If you answer all five, the one on which you score
the best will NOT be counted. All questions are counted the same: 25 points
each. Answer all parts of each question. You will need a picture ID to turn in
your exam.
You may have the textbook, class notes, handouts, copies of
submitted homework. You have from 3 pm until 4:15pm for the exam.
- SysML, AADL, and UML provide a means of describing a
problem and a solution.
- Describe
the sequence in which the languages are used. That is, which language is
used first in a development project, followed by which language, etc. Explain why that is the appropriate sequence.
- What
information is passed on as we move from using one language to another?
Be specific in your descriptions of the information.
- When
you translated the AADL model into a UML model how were AADL systems
represented in UML?
- How
is a SysML use case represented in an AADL
model?
- SysML
is used first to give a general system overview. AADL is used to take the
high-level SysML view and add details to present
an architecture and finally UML is used to give
the details of the architecture.
- We begin with a use case
model that illustrates the requirements. This information is translated
into the flows in an AADL model to show how each use is realized in the
system. The flows become sequences in the program and are represented by
UML sequence and activity diagrams.
- The “system” in AADL is a
class in UML
- As a flow
- Design
- How
is the pre-condition for a method represented in code?
- What
does
context Queue
inv: length_of_queue > 0;
mean?
Explain each item in the statement.
- How
can the emergent behavior, which results from composing two components,
be reduced or eliminated?
- Techniques
such as Guided Inspection for validating and verifying models are expensive
and time consuming yet they are used. What is the justification for their
use?
a.
As a conditional statement in the calling method.
b.
This is the statement of a condition that is always
true for any instance of the class Queue. It is always true that the queue is
non-empty.
c.
Information hiding denies one component access to the
representation of the other component and eliminates accidental changing of
values.
d.
They are expensive but it is less expensive than fixing
the defects had they not been detected until system test.
a.
- Data
and control flow through a program.
- How
does this flow show up on a class diagram? On an AADL diagram?
- When
we integrated the software and hardware platforms of the vending machine,
what flows went across the interfaces between hardware and software? How
did the team developing each side communicate to the team developing the
other side what the flow coming to them should contain?
- How
is an integration hierarchy different from an inheritance hierarchy? How
are they the same?
The associations between classes
indicate flow. On an AADL diagram there are explicit flow statements.
Events flowed from the hardware
to the software. Data flowed from the software to the hardware. Interface
specifications were used to describe the flows.
An integration hierarchy declares
instances while an inheritance hierarchy declares new classes.
- Software
engineering
- The
systems that require software engineers, as opposed to programmers, are
complex. List three techniques that we have used this semester to reduce
complexity. For each explain how it reduces complexity.
- How
can the process definitions captured in EPF actually improve the
correctness of the code produced by the project?
- Consider
the 4 major phases of RUP: Inception, Elaboration, Construction, and
Transition. What is different about these phases in a waterfall model as
opposed to an iterative model?
Information hiding – prevents the
designer from having to know the implementation details of the elements they
are using
Encapsulation – shows the
boundaries of related information
Separation of concerns – allows the
designer to solve one design problem at a time.
By giving clear role descriptions
and clear task descriptions there is less likelihood of error
The phases are encountered exactly
once in waterfall while they are encountered many times in an iterative model
- We
have used several design patterns in our design of the vending machine.
- We
used the facade pattern in our implementation of the system. What did this
do for our design? Which attributes are enhanced and which are degraded?
- Which
of the patterns that we used made the design more flexible? Define what
is meant by flexible. List each pattern that added flexibility and
describe how it enhances flexibility.
- Show
how the Model-View-Controller pattern would look in AADL. Use either the
graphical or text notation.
The façade allowed the complexity of the
implementation of several services to be hidden behind a single interface. Modularity is enhanced, performance is
degraded
The façade allows the modification of any elements
that it hides from the rest of the system. Ease of change and extension is what
we mean byflexibility.
System model
Features
In
event data port register;
Out
event data port notify
End mode
System view
Features
In
event data port information;
Out
event data port requestForData
End view
System controller
Features
Out
event data port mouseEvent
Out
event data port keyboardEvent;
End controlled