UML Class Diagrams for Software Engineering Flashcards

1
Q

What is a (data) model?

A

A model is systematic description of an object or phenomenon that shares important characteristics with the object or phenomenon.

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

What is a Business Domain?

A

In OOP a Business Domain is the set of classes that represent objects in the business model being implemented.

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

How Business Domain differs from Business Model?

A

The business model is an understanding and explanation of information and behaviors in the problem domain, while the business domain is an implementation of that model in a specific programming language.

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

Why is UML class diagrams the prime modelling instrument used to map out specific business domains?

A
UML class diagram will enable to pinpoint what makes a business unique
and provides a good starting point for developing an information system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why is domain modelling important?

A

A domain model allows a deeper understanding of that domain which is crucial for creating software systems that can adapt to the ever changing requirements of their users.

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

When does a system design fail to adapt to changing requirements?

A

When the system’s design doesn’t embody the core concept of the business.

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

Why understanding the core concept of a business is essential?

A

Because to ensure adaptability the domain model capturing the core concepts needs to be
at the heart of the information system.

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

What is a modelling language?

A

A modeling language is a collection of modelling techniques.

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

What does UML consist of?

A

Unified Modelling Language is a collection of over 9 different
modelling techniques.

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

List UML modeling techniques

A
Structure Diagrams:
Class Diagram. 
Component Diagram. Deployment Diagram. Object Diagram. 
Package Diagram. 
Profile Diagram.
Composite Structure Diagram.
Behavioral Diagrams: 
Use Case Diagram.
Activity Diagram.
State Machine Diagram. Sequence Diagram. Communication Diagram. Interaction Overview Diagram.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a modeling technique?

A

A modelling technique is what you use to write down a model.
It’s a collection of symbols, with a set of rules that define how these symbols can be composed in a valid way to form a model.

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

What is BPMN?

A

Business Process Model and Notation. It is a graphical representation for specifying business processes in a business process model.

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

What is a Class Diagram?

A

Is a technique to map out the structure
of a business domain.
It visualizes the business objects,
the information about these objects and how the objects are related to each other.

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

List a few modeling techniques

A

Entity Relationship Modelling, UML State charts, Flow Charts, Process Diagrams, Petri Nets, Event Process Chains, and so on.

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

What are Information Science perspectives about data?

A

Typical viewpoints in IS design are the data perspective, the behavioural perspective and
the interaction perspective.

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

List some Business Modeling techniques with the same viewpoint

A

Business process modelling can be done with BPMN Process diagrams or with Petri Nets.
Conceptual data modelling can be done with entity relationship modelling or
with UML Class diagrams.

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

What is the Entity Relationship Modeling Technique used for?

A

It was created for database conceptual design and was later extended with insights from semantic modelling, becoming the “Extended Entity
Relation modelling” technique.

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

What do different Data Modeling Techniques have in common?

A

they all rely on the same concept of
classes, represented as boxes, and associations, represented as lines that connect those boxes.
Those associations are adorned at their end with cardinalities.
The most prominent difference between the various techniques, is the way those cardinalities are represented.

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

What is a Class?

A

A class represents a collection of objects that conform to its intent and is the template or a model for a group of real world objects that are similar.

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

What is the “Intent of a Class”?

A
It is the definition of the concept that captures class membership. For example a person is a college student only
if that person is subscribed for at least one study program at some university.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is the “Extent of a Class”?

A

Is the representation of a collection of objects that conform to its intent.

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

What does the Intent class template focus on?

A

It captures characteristics that are relevant about the objects in the class.

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

What are the “attributes” of a Class?

A

The characteristics and information about every individual object in a class.

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

What is the use of data types?

A

Data types constrain the values that can be given for a particular attribute.
When an instance is given a value for an attribute, this value has to follow the constraints implied by its own data type.
Data types also define the permissible operations on a certain object property.

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

How does UML represents Class Diagrams?

A

With Boxes labeled with the Class’s name.

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

How does UML class diagram represent attributes and data type?

A

In a UML class diagram attributes and their data types are written in a box below the Class Name.

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

What is a Class Definition?

A

It is the description of when an object is considered to be a member of that class.

28
Q

Why are class definitions important?

A
A class diagram as a conceptual domain model is always made for a specific domain, namely the organization for which we create the domain model.
What a concept represents, and what is relevant or irrelevant is different and specific for each organization.
Class definitions allow us to create a vocabulary for the organization so
that everybody knows what is meant with a certain kind of concept and has the same idea of when an object is member or not of a particular class.
29
Q

What is an “Ontology”?

A

Is the vocabulary of relevant and irrelevant concepts about objects to be captured in a class definition, with respect to the specific Domain of an Organization

30
Q

What is an “Ontology” in IS?

A

In information science an ontology formally represents knowledge as a set of concepts within a domain.

31
Q

How does UML define an Ontology?

A

Through the classes that are defined in the UML class diagram the conceptual domain model defines a shared Ontology for a specific Organization.

32
Q

What is the “principle of abstraction”?

A

The principle of abstraction is a grouping principle, whereby a hierarchy is adhered to with higher levels of abstraction placed near the top with more specific concepts underneath.

33
Q

What does “to follow the principle of abstraction” mean?

A

Following the principle of abstraction means that similar relationships or links between instances (associations) at level 0 need to be abstracted into a higher level concept at level 1.

34
Q

What is ans Association?

A

An Association is a level 1 concept that relates classes and that represents a collection of links between the objects of those classes.

35
Q

LIst the characteristics of an association

A

The first of these characteristics is whether it is optional or
mandatory to have a link with other objects.
The other important characteristic is the
maximum number of objects we will find at the other side of the association.

36
Q

How are Associations represented in UML?

A

The way we write down an association in UML can vary. It’s always a line that connects the two classes and the line can be annotated with extra information.

37
Q

How to read an Association?

A
An association can be read in two directions. These individual directions are called the 'roles' of the association. Each role has a name and the role name is put next to the destination class of the role.
Another notation is to put the role names in the middle adding arrows to clarify the association direction.
In UML the use of roles is not mandatory, so there may be associations that don't specify roles.
38
Q

How does multiple associations between the same set of classes work?

A
When you have two classes in a UML class diagram you can have two different associations between
those two same classes. So here's an example where a person can on the one hand be the
owner of a car and on the other hand can be the driver of the car.
39
Q

What is Unary Association?

A

It is an association connecting a class to itself. This is called a unary association.

40
Q

Give an example of Unary association

A

An example is when people are related to each other.
In this example a person is supervised by someone or someone is the supervisor of other people
Then you have an association with roles “supervises” and “supervised by”, depending
in what direction you read the association. This expresses the fact that people can be
related to each other.
So in the instance level example you see that Eric supervises Bart and that Bart is supervised
by Eric and on the other hand Erik supervises Jan and Jan is supervised by Erik.

41
Q

How does relation hierarchy work?

A

It is zero if an object is at the top of the hierarchy, and one otherwise.

42
Q

Are there forced constraints as for the Entity Relation Model?

A

No constraint is enforced on the two participants of a link.

So an object could link itself or nothing.

43
Q

How do you apply constraints to UML?

A

By the Object Constraint Language (OCL), a declarative language describing rules applying to Unified Modeling Language

44
Q

What is a Ternary association?

A

N-ary associations are the tool provided by UML to realize an associations involving more than two classes.

45
Q

What does the UML manual say about the interpretation of multiplicities?

A

For an Association with N member Ends, choose any N-1 ends and associate specific instances with those ends.
Then the collection of links of the Association
that refers to these specific instances will identify a collection of instances at the other end.
The multiplicity of the other end constrains the size of this collection.

46
Q

Explain the concept of aggregation

A

Some associations convey a meaning of a “part of” relation or composition.
In the UML, you can adorn the association end at the side of the “whole” with a diamond to clarify that the association has a “whole-part” meaning.
The diamond comes with two flavours:
The white diamond represents a shared aggregation. Intuitively, this means that the parts can
be shared by different wholes.
The black diamond represents a composite aggregation, which is intended as a stronger form of ownership, meaning that the parts are owned by only one whole.
The UML manual states that a part can be included in at most one composite object at a time.
When using the black diamond, the multiplicity
on the side of the whole should be 1..1 or 0..1
Also, composite aggregation is associated with a cascading delete:
If the composite object is deleted, all of its part objects are deleted with it

47
Q

What is an Association?

A

Association is an abstraction of relationships/links between instances of classes (objects).
Association is a level 1 concept because at level and object is associated with itself at most

48
Q

Properties of associations

A
  • Define if a link is ptional or mandatory.
  • ## Define maximum number of objects of the same class to be in association with the level 0
49
Q

How to read an association?

A
An association can be read in two directions. The role from a source class to another is put next to the destination class and vice versa, because an association can be read in two ways. Another notation is tu put association names in the middle, adding arrows to clarify the verse of the association.
An association can also legally be represented by a simple line, omitting role names.
associations between two classes can be more than one, in that case multiple lines are drawn in different color to represent the associations
50
Q

What is a Derived/Implicit association?

A
when more classes are linked each other by other classes, here we have an indirect association, so that if we have classes A, B and C, and class A is linked to class B which is linked to class C, then classes A and C are linked indirectly thanks to class B. This is an implicit/derived association.
Such implicit association is not drawn in the diagram, but you've to be aware of it's existance
51
Q

Wrong associations and missing associations

are detrimental to information need satisfaction.

A

in some cases implicit associations must be explicated in order to satisfy the needs for navigation and information

52
Q

What are issues following parallel paths in UML classes diagrams?

A

Following different paths can result in different sets of results, this depends on how data are associated.

53
Q

Describe the concept of generalization and specialization in UML

A
This concept is a UML association construct.
It relates to inheritance, fundamental concept of object oriented programming: a class can inherit attributes and operations from a parent class. This same concept can be expressed with supersets and subsets.
54
Q

How do you describe generalization and specialization in UML?

A
The more general concept is called generalization, superclass or supertype, the more specific concept is called the specialization, subclass or subtype.
Generalization/specialization association is drawn as a line connecting the super type to the subtype and is adorned with a triangle pointing towards the super type.
Triangles of different subtypes can be merged into one triangle or be separate.
55
Q

What does the principle of inheritance state?

A

The principle of inheritance states that a subtype inherits the features of the super type.

56
Q

Explain the problem with generalization sets.

A

Because different partitions are possible the result of two different partitioning of the same superset may return different subsets

57
Q

How Specializations are grouped in UML?

A

UML allows to group Specializations into
orthogonal dimensions.
Each group is represented by a generalization set.

58
Q

Describe UML generalization set representations

A

There are three notations to represent generalization sets.
1) Putting a name designating the General set to which the specialization belongs, next to the Generalization relationship lines.
All General relationships with the same General set name are part of the same generalization set.
2) Lines can be drawn to the same arrowhead and labelled by a single
General set name - “shared target” style.
The classes that share an arrowhead are part of the same generalization set.
With either of these two notations, if there are no labels on the arrows
it’s hard to say if there are generalization sets in the model.
3) A dashed line across the relationship lines
with separate arrowheads that are meant to be part of the same set.
Here, each specialization set is labelled with a single name, instead of each line labelled separately.

59
Q

Constraints on generalization/specialization

A
There are two constraint types:
1) Completeness/ Incompleteness. 
Do the sub-classes cover all the elements of the super-class? If yes, the specialization of the sub-classes is Complete, otherwise it is Incomplete and extra care must be put in considering the eventuality of other objects in the super-class not comprised in the sub-classes.
2) Disjoint/ Overlapping.
Are there object pertaining to more than a sub-class at the same time? If yes, then we have Overlapping sub-classes, otherwise we have Disjoint sub-classes.
Default behaviour in UML is to assume overlapping sub-classes.
60
Q

How does UML describe disjoint/overlapping sub-classes?

A

Including the words that indicate the correct constraint between curly brackets next to the triangle, for example like this:
{complete, disjoint} or {incomplete, overlapping}

61
Q

Inherited Associations

A

The general rule is that you have to read inheritance as an OR. In the case of multiple inheritance trees in a single diagram, extra care is required.

62
Q

Association Class

A
associations aggregate data from different classes, generating a new composite set. With association classes we take a composite association and define a new class based on it. 
The association class is therefore named like a Class, and it can have attributes and operations based on the characteristics of the elements comprising the new resulting set.
63
Q

Association Reification

A

Association Reification is the process of turning an association or Association Class into a Class.

64
Q

Multiplicity in reification

A

Because links always relate exactly one object of each class participating in the association, the multiplicities for the roles referring to the base classes are always 1-to-1, while the multiplicities for the new class are received from the previous situation.

65
Q

Reifying unary association

A

When reifying a unary association, care must be taken to carefully distinguish the role the class plays in the association.