Lecture 4 Flashcards

1
Q

how do we represent class and name in uml? and abstract class?

A

rectangle, words and name start with capital, name can also be pathname package::class. abstract - name is in italics

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

what are the components of a class rectangle?

A

0 - name, 1 - attributes, 2 - operations (functions), 3+ - other features

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

how are attributes represented in UML?

A

name, can have type, visibility, default value, derived value, multiplicity

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

explain visibility and symbols (also multiplicity, derived and default value)

A

+ - public, - - private, # - protected, = - default, / - derived, [] - multiplicity. eg -/age : integer, -date : Date = today, middleName[0…2] (attribute can have 0 - 2 values)

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

what is the correct uml way to write operation?

A

have a name, optional: visibility, parameter names and types, return type

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

what is the difference between instance and class scope?

A
class-scope attributes - same for all instances of class (interest rate)
instance-scope attributes - different instances of the class can have different values
default - instance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

explain what an association is

A

-name, roles the participating objects play. eg word that goes on line between 2 classes

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

explain relationships of different degrees

A
reflexive - involves instances of the same class
binary - degree 2, ternary - degree 3, n-ary - more than 3
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

multiplicities of higher degree relationships

A

eg relationship between country, company and product. on product have 0..10, each company can only 10 products to same country

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

how do we represent constraints?

A

eg person if related to itself (person marries person), a box that says (p1 and p2 can marry if both over 18) and connected to relationship line with dotted line

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

what is an association class?

A

a class that comes off of a relationship line (if the association (relationship) need info about itself or behaviour)

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

how do we show an object and link diagram?

A

box(e1 : employee) connected with line to box(p1:permit) and box(p2:permit)

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