UML Baiscs Flashcards

1
Q

What is the basic premise of the UML

A

A software system can be modeled as a collection of collaborating objects

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

Why do we build models

A

Models succinctly describe reality, show essencial details and filter out non-essential details

This allows us to focus in the big picture

Such focus allows us to deal with the complexity of software development

The result is a better understanding of the requirements, cleaner designs, and more maintainable systems

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

What are class attributes?

A

An attribute describes the data values held by objects in a class

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

What are the properties that can and have to be specified when creating classes attributes

A

Name of the attribute, its type and its visibility are required. We can than define its initial value, multiplicity and its changeability

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

How can we define the visibility of a class attribute?

A

Public (+)

Private (-)

Protected (#)

Package (~)

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

What are class operations

A

They describes a function or transformation that may be applied to or by objects in a class

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

How do we specify operations in a class?

A

Name, parameters, the result type and its visibility

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

How do we call an operation instance? What about when an operation have several methods that implement it?

A

The implementation of an operation is called a method

And when there are more than one method the implements an operation we call it polimorphic operation

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

What are links and associations and how do they relate to each other?

A

Links are relationships between objects

Associations are a description of the links between objects

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

What are the possible interpretations of associations?

A

Conceptually, associations are bi-directional

You can show navegability of associations with an arrowhead (implies that’s the source object has a reference to the target object)

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

What are the multiplicities in associations?

A

They specify a restriction on the number of objects in a class that may be related to an object in other class

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

Why is the obvious way for storing data in a UML class diagram?

A

The obvious option in to store as an attribute under the classes

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

What is the second option for storing data in a UML class diagram?

A

The second option is to use a multi-valued attribute for the data, where we have an array of grades under the student.

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

What is the limitation of using a multi-valued attribute for the data?

A

We might have a problem of data correspondence

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

What is the third option for storing data in a UML class diagram?

A

The third option is to use an association class to model the properties of the association between the two associated classes.

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

How does the association class help in storing grades?

A

The association class allows us to store the data under the association between the classes

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

What is the limitation of using an association class for storing data?

A

The limitation is that if there are more than one link between the objects, we can only keep track of the most recent one, losing the historical information.

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

What is generalization in software engineering

A

Is a relationship between classes of the same kind, where a class can be specialized into different subclasses

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

How can generalization be represented in a class diagram

A

Using a triangle symbol

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

What are the two approaches to performing generalization?

A

The two approaches are top-down and bottom-up. In top-down, we start with a general class and specialize it into specific subclasses. In bottom-up, we identify similar classes and generalize them into a more general class.

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

What is the benefit of using inheritance in generalization?

A

Inheritance allows us to extract common attributes, relationships, and operations and put them in a superclass. This promotes reusability and simplifies modification of descriptions.

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

What is overriding in inheritance?

A

Overriding is when a subclass defines its own version of an operation that is already defined in the superclass. The subclass’s version of the operation will be used instead of the superclass’s version when applicable.

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

What are overlapping and disjoint coverage in generalization?

A

Overlapping coverage means that some instances can belong to multiple subclasses. Disjoint coverage means that instances can only belong to one subclass and not to multiple subclasses.

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

What is completeness coverage in generalization?

A

Completeness coverage refers to whether all possible instances are covered by the subclasses. It can be either complete, meaning all instances are covered, or incomplete, meaning there may be instances not covered by the subclasses.

25
Q

How can additional information be provided in a class diagram?

A

Additional information can be provided using notes in the class diagram. For example, if there are specific constraints or details about the subclasses, they can be mentioned in a note beside the diagram.

26
Q

What is UML and how is it used in software engineering?

A
  • UML stands for Unified Modeling Language and it is a standardized visual language used to model software systems.
  • It helps software engineers to visualize, specify, construct, and document the artifacts of a software system.
27
Q

What are the different types of relationships in class diagrams?

A
  • The different types of relationships in class diagrams are aggregation, composition, and generalization.
  • Aggregation represents a “has-a” relationship between classes.
  • Composition is a stronger form of aggregation where the lifetime of the contained class is dependent on the container class.
  • Generalization represents an “is-a” relationship where one class is a specialized version of another class.
28
Q

How can additional constraints be specified in UML diagrams?

A
  • Additional constraints can be specified in UML diagrams to define certain requirements or conditions.
  • Constraints can be added alongside operations or as notes in the class diagram.
  • They are statements that can be tested to be true or false, and they help enforce specific rules or conditions in the system.
29
Q

What is system requirements capture and domain modeling?

A
  • System requirements capture involves identifying and documenting the requirements of a software system.
  • Domain modeling is the process of capturing the entities and relationships within a specific application domain using class diagrams.
30
Q

What is UML?

A

UML stands for Unified Modeling Language. It is a general-purpose visual modeling language used to represent systems.

31
Q

Is UML specific to object-oriented systems?

A

While UML is suitable for object-oriented systems, it can also be used for non-object-oriented systems.

32
Q

What are the building blocks of UML?

A

The building blocks of UML include important objects, relationships, and diagrams that are used to represent a system.

33
Q

What are the different perspectives in UML?

A

UML allows us to build models from different perspectives, such as the use-case view, logical view, implementation view, process view, or deployment view

34
Q

What is the class diagram used for?

A

The class diagram is used to capture the data requirements within a software system. It represents a collection of objects and their relationships.

35
Q

Why do we build models in software development?

A

Models are built to facilitate effective communication among stakeholders and to focus on the big picture of the software system. They help us understand requirements, design, and create more maintainable software systems.

36
Q

What are the benefits of building models?

A

Building models helps ensure consistent understanding among stakeholders, allows us to focus on the big picture, and helps us deal with the complexity of software development.

37
Q

How does the class diagram help in capturing data requirements?

A

The class diagram allows us to identify and represent the important objects within the application domain, such as organizations, people, and cars. It helps us capture the relationships between these objects and their attributes, which are essential for understanding the data requirements of the software system.

38
Q

What are the different types of UML diagrams?

A

The different types of UML diagrams include class diagrams, use case diagrams, sequence diagrams, activity diagrams, and more.

39
Q

What are the types of relationships that can be represented in a class diagram?

A

The types of relationships in a class diagram include association, aggregation, composition, and inheritance.

40
Q

What is domain modeling?

A

Domain modeling is the process of creating a conceptual model that represents the entities, attributes, and relationships within a specific problem domain.

41
Q

What are associations in class diagrams?

A

Associations in class diagrams represent links between objects or classes within a system.

42
Q

What are the three types of associations in class diagrams?

A

The three types of associations are unary, binary, and ternary associations.

43
Q

Can you explain unary associations?

A

Unary associations involve instances within the same class associating with each other.

44
Q

What is the concept of bidirectional associations?

A

Bidirectional associations mean that associations are associated with each other, allowing for connections between objects in both directions.

45
Q

How can navigability be represented in associations?

A

Navigability can be represented using arrowheads to indicate dependencies between classes.

46
Q

Can there be multiple associations between the same pair of classes?

A

Yes, as long as the associations have different meanings, multiple associations can exist between the same pair of classes.

47
Q

What are multiplicities in class diagrams?

A

Multiplicities specify the number of objects that can be related to each other in an association.

48
Q

How are multiplicities represented in class diagrams?

A

Multiplicities are represented using lower and upper bounds to define the range of associations.

49
Q

How are multiplicities represented in class diagrams?

A

Multiplicities are represented using lower and upper bounds to define the range of associations.

50
Q

What is the difference between aggregation and composition?

A
  • Aggregation and composition represent the “part of” relationship between classes.
  • Aggregation indicates optional participation, while composition indicates mandatory participation.
51
Q

How do you decide whether to use aggregation or composition?

A
  • The decision to use aggregation or composition depends on whether the part is dependent on the whole.
    • If destroying the whole also destroys the part, composition should be used.
    • If the part can exist independently of the whole, aggregation should be used.
52
Q

What is the primary purpose of a class diagram in software development?

A

The primary purpose of a class diagram is to model a system by representing its components as classes. This helps in understanding the system’s important components, facilitating system specification, and promoting modularity in software development.

53
Q

What is a class, and how is it used in a class diagram?

A

A class is a blueprint for grouping objects that share common attributes and operations. In a class diagram, classes are used to represent the major components of a system. For example, in a banking software system, different types of bank accounts can be represented as a single class called “account.”

54
Q

Why is it important to capture only one abstraction in a class?

A

Capturing only one abstraction in a class ensures clarity and precision. A class should represent one important concept within the application domain and should be named using meaningful, domain-specific vocabulary that is traceable.

55
Q

What are attributes in the context of a class, and why are they important?

A

Attributes are properties or characteristics of a class. They are important because they define the data associated with objects of the class. For instance, in the “account” class, attributes might include account number and balance.

56
Q

What are operations in a class diagram, and what role do they play?

A

Operations are functions or transformations that can be applied to objects within a class. They define the behavior of the class. For example, operations for an “account” class might include checking the balance, depositing money, and withdrawing money.

57
Q

What is the difference between an operation and a method in a class?

A

An operation describes a function or transformation that can be applied to objects of a class, while a method is the specific implementation of that operation. Multiple methods can implement the same operation in different ways.

58
Q

What are the benefits of using classes to model software systems?

A

Using classes to model software systems helps in understanding the system’s important components, facilitates system specification, and promotes modularity. Representing the system as a collection of objects and classes also aids in clear and structured design

59
Q

Why is choosing the appropriate classes considered an important design decision?

A

Choosing appropriate classes is crucial because it directly impacts the modularity and structure of the software. Proper class selection leads to a more organized and maintainable system design.