Midterm Study - UML Class Flashcards

1
Q

How do you find system requirements needed for “things”?

A

WHAT THINGS DOES THE SYSTEM NEED TO KNOW ABOUT AND STORE INFORMATION ABOUT?

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

What are some different types of things?

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

What is the procedure for developing an initial list of things?

A

Step1: Using the event table and information about each event, identify all nouns in the system.

Step2: Using other information from existing systems, current procedures, and current reports or forms, add items or categories of information needed.

Step3: Refine list and record assumptions or issues to explore.

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

What is an object?

A

An object is an entity(thing) that has a well-defined role in the application domain, and has a state, behaviour and identity.

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

Explain the parts in an object?

A

Class: Type of thing

Object: each specific thing

Methods: Behaviours of objects of the class

State: the values for the attributes (which can be set and changed by methods)

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

What are the 3 main parts to a class in a class diagram?

A

Class name at the top, List of attributes in the middle, and list of operations or methods on the bottom.

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

What is a class diagram?

A

The class diagram models classes of objects instead of data entities.

Include Generalization/Specialization & Aggregation

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

What is Generalization/Specialization Hierarchies?

A

General superclasses to specialized subclasses.

Inheritance allows subclasses to share characteristics of their superclasses.

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

What is aggregation (whole-part hierarchies)?

A

Aggregation relates objects and its parts, defines objects in terms of its parts.

Example: A Personal Computer is an object in itself, but is composed of a CPU, Monitor, Keyboard etc… It is made of of other objects that can exist on their own, therefore it represents aggregation

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

What is Composition (whole-part hierarchies)?

A

Similar to aggregation where the one object is made up of many objects except the objects belong to the whole object.

Example, the room is “part of” a building, but if the building is gone so is the room.

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

How do you represent a class that has a many-to-many relationship between two other classes?

A

With a dotted line.

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

What are the three types of operations in an object model? (class)

A

Query (getter): An operation that accesses the state of an object but does not alter the state.

Update (setter): An operation that alters the state of an object.

Constructor: An operation that creates a new instance of a class.

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

How do you represent associations?

A

Association

  • A relationship between object classes
  • Degree may be unary, binary, ternary or higher
  • Depicted as a solid line between participating classes

Association Role

  • The end of an association where it connects to a class
  • Each role has multiplicity, which indicates how many objects participate in a given association relations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does a Unary association relationship look like?

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

What does a binary association relationship look like?

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

What does a ternary association relationship look like?

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

What is an overlapping constraint and what would it look like in a diagram?

A

Overlapping: A descendant may be descended from more than one of the subclasses.

18
Q

What would a diagram look like that shows abstract operations, class scope attributes and polymorphism?

A
19
Q

How would a detailed class in a class diagram look?

A
20
Q

What are constraints and what do they look like in a diagram?

A
21
Q

What does an abstract class look like in a diagram?

A
22
Q

How would you display an interface in a diagram?

A
23
Q

What are the standard stereotypes found in design models?

A
24
Q

What is coupling?

A

Coupling is a general term derived from navigation visibility, a qualitative measure of how closely classes in a design class diagram are linked. Based on a number of navigation arrows on design class diagrams. Low: system is easier to understand and maintain (preferred). With coupling, a change in one class ripples throuhout the entire system.

25
Q

What types of coupling are there and list them from bad to good?

A

Content (bad)

Common

Contol

Stamp

Data (good)

26
Q

What is data coupling (good)?

A

Data coupling - Data coupling is when modules share data through, for example, parameters. Each datum is an elementary piece, and these are the only data which are shared (e.g. passing an integer to a function which computes a square root)

27
Q

What is stamp coupling?

A

Stamp coupling (Data-structured coupling) - Stamp coupling is when modules share a composite data structure, each module not knowing which part of the data structure will be used by the other (e.g. passing a student record to a function which calculates the student’s GPA

28
Q

What is control coupling?

A

Control coupling - Control coupling is one module controlling the logic of another, by passing it information on what to do (e.g. passing a what-to-do flag)

29
Q

What is external coupling?

A

External coupling - External coupling occurs when two modules share an externally imposed data format, communication protocol, or device interface.

30
Q

What is common coupling?

A

Common coupling - Common coupling is when two modules share the same global data (e.g. a global variable).

31
Q

What is content coupling?

A

Content coupling - Content coupling is when one module modifies or relies on the internal workings of another module (e.g. accessing local data of another module)

32
Q

What is cohesion?

A

Cohesion is a qualitative measure of consistency of functions (methods) within a single class.

High cohesive example: Student class methods to enter student ID and name

Low cohesive example: Student class also has methods to make classroom assignments or assign professors to courses

Separation of responsibility – divide low cohesive class into several highly cohesive classes. High cohesion is desired. Classes with low cohesion are Hard to maintain, hard to reuse, difficult to understand

33
Q

What types of cohesion are there and list them from bad to good.

A

Coincidental (bad)

Logical

Temporal

Procedural

Communicational

Informational

Functional (good)

34
Q

What is Functional cohesion?

A

Functional cohesion is when parts of a module are grouped because they all contribute to a single well-defined task of the module (a perfect module).

35
Q

What is informational (sequential) cohesion?

A

Informational (sequential) cohesion is when parts of a module are grouped because the output from one part is the input to another part (e.g. a function which reads data from a file and processes the data)

36
Q

What is communicational cohesion?

A

Communicational cohesion is when parts of a module are grouped because they operate on the same data (e.g. a method updateStudentRecord which operates on a student record, but the actions in which the method performs are not clear)

37
Q

What is procedural cohesion?

A

Procedural cohesion is when parts of a module are grouped because they always follow a certain sequence of execution (e.g. a function which checks file permissions and then opens the file)

38
Q

What is temporal cohesion?

A

Temporal cohesion is when parts of a module are grouped by when they are processed - the parts are processed at a particular time in program execution (e.g. a function which is called after catching an exception which closes open files, creates an error log, and notifies the user)

39
Q

What is logical cohesion?

A

Logical cohesion is when parts of a module are grouped because of a slight relation (e.g. using control coupling to decide which part of a module to use, such as how to operate on a bank account)

40
Q

What is coincidental cohesion?

A

Coincidental cohesion is when parts of a module are grouped arbitrarily; the parts have no significant relationship (e.g. a module of frequently used functions).

41
Q
A