Lecture 8 Flashcards

1
Q

What is a structural model?

A

Capture the structure of a system. Elements and their connection can be perceived even without executing the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Software modeling helps in establishing what?

A

The context and (intended) functionality of a system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the steps of relevance of modeling in software development.

A

Analysis: Use uniform notation for use cases, unify terminology.
System Design: Create coarse-grain system structure, abstract for decision-making.
Detailed Design: Develop fine-grain system design, specify and agree on behavior.
Implementation: Models as implementation specs.
Quality Assurance: Ensure implementation matches models, use for testing behavior.
Maintenance: Evaluate changes based on model feasibility/effort.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what should models abstract from?

A

Details and instead focus on the “design essence” of the system

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which UML (unified modeling language) diagrams are structured?

A

Class diagram
Object diagram
Deployment diagram

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does UML stand for?

A

The Unified Modeling Language (UML)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Mention the main diagram types of the UML.

A

Structure diagram
Behaviour diagram
(Interaction diagram)Her

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you describe the process of creating an UML class diagram?

A

Purpose: Create a general software system design focusing on essential problem-solving.
Process: Start with a high-level design, refine to detailed implementation.
Focus: Abstract technical details to prevent getting lost in technology discussions, emphasizing domain challenges

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is UML?

A
  • Standard defining meta model for software modeling
  • Standard specifying model concepts and their relations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Give an example of what a class diagram (single box) might look like:

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What the UML is not:

A
  • A graphical language standard (only suggestions)
  • A model with formal semantics (instead interpretation using common sense)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are associations in UML class diagram?

A

Reference to another class (entities) Her

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is meta model?

A

A meta model captures the syntactic elements and their potential relations. You can think of this as the blueprint of a language that tells you which concepts can be expressed
(vocabulary) and in which way they may be combined (grammar).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is a role in an UML class diagram?

A

A class playing a role
her

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the three visibility modifiers, and their symbols?

A

Protected #
Private -
Public +

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an association, association class and association name in UML class diagram?

A

Association: Reference to another class’
objects.
Association class: Additional information for association
Association name: In middle of association, and is in the reading direction
her

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is a Class Member? How is that declared?

A
  • Underlined
  • Same value/declaration for all objects of class
  • Similar to static in Java
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do you write attributes, methods and parameters in an UML class diagram?

A

vis.mod = visibility modifer
Attributes: vis.mod. <name> : <type>
Methods: vis.mod. <name>() : <type>
vis.mod. <name>(<parameters>) : <type>
Parameters: Similar to attribute

19
Q

Is it okay to omit visibility modifiers/types/names?

A

Yes, class diagrams provide a lot of liberty in regard to providing names, types, visibility modifiers: eg, visibility modifiers or types may be omited altogether for early design phases

20
Q

What is an multiplicity in UML class diagram?

A

Lower bound, e.g., 0 or 1
Upper bound, e.g., 5 or *
(remember ER diagrams in databases)
Her

21
Q

What is an aggregation in regards to class diagrams? What does it look like?

A

An aggregation is a special case of an association. An aggregation means that objects of the referenced class are “owned” (unlike plainassociations but similar to composition).

It looks like a empty diamond on a line with an arrow in the other end

picture

21
Q

Write down the diagram type, modeling of, purpose and benefits of an UML class diagram

A

Diagram type: Structual diagram
Modeling of: classes, interfaces, relations
Purpose: Abstraction from, so individual objects via classes and details for design
Benefits: Modeling a subsystem for analysis and design. Reverse engineering existing system design for overview
her

22
Q

What kind of relationship does aggregation imply?

A

a relationship where the child can exist independently of the parent (unlike composition). Example: Lecture (parent) and Student (child). When you delete the Lecture, the Students still exist.

picture

23
Q

What is association, aggregation and composition in UML class diagram?

A

Association: References
Aggregation: owns but does not manage lifecycle
Composition: own and managaes lifecycle
her

24
Q

What is a composition in regards to class diagrams? What does it look like?

A

A composition is a special case of an association. A composition means that objects of the referenced class are “owned”. (unlike plain associaions but similar to aggregation).

It looks like a filled diamond on a line with an arrow in the other end.

picture

25
Q

What are interfaces, enumerations and stereotypes in UML class diagram?

A

Interface: <<interface>> (written using stereotypes («») (DRAWN WITH DASHED LINE, IMPLEMENTS)
Enumeration: <<enumeration>> (written using stereotypes («»)
Stereotype: Written using «»
Her

26
Q

What kind of relationship does compositon imply?

A

A composition means that the referenced object is “part-of” the referencing object (unlike
aggregation). In other terms, the referencing object manages the lifecycle of the referenced object.)

picture

27
Q

How does generalisation look like in an UML class diagram?

28
Q

How does he UML Generalization denotes inheritance?

A

Generalization (super class) and specialization (sub class)

29
Q

Difference between classes and objects (UML diagrams) and how to draw?

A

Class: Description of similar elements. Object is an instance of a class
Object: Concrete, individual element. Maintains (unchangeable) identity after creation
Her

30
Q

How does class diagrams denote abstract methods/classes?

A

Writng them in italics.
However, for hand-drawn UML diagrams, this is somewhat impractical because it is hard
to distinguish italics in hand-writing. In such a case, , it may be helpful to add a comment stating that the respective element is abstract.

31
Q

Difference between UML and Java (protected visbility, inheritance, association type, association classes)

A

UML
Protected visbility: Visible only for class and subclasses
Inheritance: Multiple
Association types: Association, Aggregation, Composition
Association classes: Directly supported

Java:
Protected visbility: Visible for class, subclasses
and same package
Inheritance: Single
Association type: Reference
Association class: Need to be emulated

32
Q

What phases are likely to yield what diagrams?

A

Analysis (requirement engineering) = use case diagram
Coarse-Grain Design and fine grain = class diagram
implementation = code

33
Q

Write down the diagram type, modeling of, purpose and benefits of an UML deployment diagram

A

Diagram type: Structual diagram
Modeling of: physical deployment of
artifacts on nodes
Purpose: Show which parts of a distributed application run on which parts of
the infrastructure.
Benefits: Specify distribution of software. Determine necessary hardware infrastructure. Devise communication strategies
her

34
Q

Difference in fine-grain and coarse-grain desing?

A

Coarse-grain class design may be relatively informal: Names may be informal in syntax. Types may be omited, esp. the (technical) return type void.
Fine-grain class design has to be specific so that it can serve as basis for implementation.

35
Q

What is an artifact in UML deployment diagram?

A

Artifact: A piece of software (component, object, document, etc,)
It’s deployed to nodes
Her

36
Q

Draw a UML program for this:
Here

37
Q

Name these things:

A
38
Q

Characteristics of object diagrams:

A

Structural Diagram, models objects (class instances), show example of objects with their specific values.

Good for:

  • Talk about system states with
    concrete values for objects.
  • Integrate with behavioral
    notations that explain system
    execution via examples.
39
Q

Draw a simple object diagram

A
40
Q

Is the name of an object mandatory (object diagram)?

A

No, an anonymous object can be
displayed instead, e.g., “:Engine”.

41
Q

What does a node describe in deployment diagrams?

A

An “instances” of specific pieces of hardware, e.g., a web server, a laptop or a database server.
Nodes may have attributes (RAM ect) and nodes can be nested. (sub-nodes)

42
Q

Take home message:

A
  • UML Class Diagrams: Fine-grained specification of system structure.
  • UML Object Diagrams: Example of system state via
    instances
  • UML Deployment Diagrams: Distribution to physical
    components.