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.


  1. SysML, AADL, and UML provide a means of describing a problem and a solution.
    1. 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.
    2. What information is passed on as we move from using one language to another? Be specific in your descriptions of the information.
    3. When you translated the AADL model into a UML model how were AADL systems represented in UML?
    4. How is a SysML use case represented in an AADL model?

 

  1. 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.
  2. 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.
  3. The “system” in AADL is a class in UML
  4. As a flow

 


 

  1. Design
    1. How is the pre-condition for a method represented in code?

 

    1. What does

 

context Queue 

inv: length_of_queue > 0;

                       

mean? Explain each item in the statement.

 

    1. How can the emergent behavior, which results from composing two components, be reduced or eliminated?

 

    1. 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.        

  1. Data and control flow through a program.

 

    1. How does this flow show up on a class diagram?  On an AADL diagram?

 

    1. 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?

 

    1. 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.

  1. Software engineering
    1. 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.

 

    1. How can the process definitions captured in EPF actually improve the correctness of the code produced by the project?

 

    1. 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

 


 

  1. We have used several design patterns in our design of the vending machine.
    1. 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?

 

    1. 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.

 

    1. 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