Book 2 Flashcards

1
Q

Identify objects in problem domain

A
  • Tangible objects - Physical things
  • Roles - Roles played by people
  • Business transactions - Activities, episodes and interactions
  • Organisational units - Groups to which people belong
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Glossary

A
  • Created at start of project

- Agreed on by everyone

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

Change of behaviour over time in objects

A
  • Object can’t change class during its lifetime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Class model

A
  • Indicates classes in the system

- Describes associations between classes

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

Object model

A
  • Collection of objects where every object is an instance of a class in class model
  • Snapshot of the system
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Representing object and class models

A
  • Object model represented by object diagram

- Class model represented by class diagram

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

Object diagram

A
  • Each object represented by box
  • Inside box is name: name of class both underlined
  • Can add names and attributes underneath
  • Boxes joined by links
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Class diagram

A
  • Consists of boxes and lines
  • Can hold up to three things in box unlike object with 2
  • Name = class name, attribute, operations
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Difference between modelling a class or attribute

A
  • If conceptual class X can’t be thought of as a number or text its probably a class not an attribute
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Multiplicities

A
  • 1 = exactly 1, same as 1..1
  • 3..5 = between 3 and 5, inclusive
  • 1..* = 1 or more
  • 7,12,365 = 7,12,365 (and no other)
    • = Same as 0
  • blank = undefined
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Models

A
  • Conceptual Model first
  • Then analysis model
  • Then design model
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Agile model goals

A
  • Lightness and simplicity take precedence over completeness and complexity
  • Models only pursued when of use
  • Ease of change and adaptability need to be part of modelling process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Naming associations

A
  • Place association name in middle of association line
  • using role names
  • role names allow you to name ends of associations differently
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Recursive

A
  • Association between class and itself
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

With attributes what is effect of moving from conceptual model to analysis model?

A
  • Conceptual model records attributes of classes familiar to domain expert
  • Analysis model must consider attributes in software sense
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why is class model not sufficient to describe system?

A
  • Class model is static model
  • Doesn’t model behaviours
  • Need to model histories of objects and interactions between them
17
Q

Aggregation association

A
  • Whole-part relationship
  • Must be free of cycles
  • In UML use open diamond at end of whole class
18
Q

Composition

A
  • Stronger form of aggregation
  • Composed objects part of one composing object
  • If composing object deleted, all composed objects must be deleted
  • In UML use black solid diamond at end of whole class
19
Q

Navigability

A
  • Indicates that its possible to reach one class form another
  • If no arrowheads on links navigability assumed both ways
20
Q

Qualified association

A
  • Can be used If class has unique identifier-

- Qualifier represented by rectangular box at far end of association from class UI is in

21
Q

Association class

A
  • Has properties of its own

- Imposes restriction that there can be at most one instance of association per pair of objects linked to association

22
Q

Derived associations

A
  • Associations can be derived
  • Attributes can be derived as well
  • Use slash notation before name
23
Q

Specialisation

A
  • Superclass and subclass
24
Q

Interface of class

A
  • Set of operations that specify service it provides
25
Q

Substitutability test

A
  • Tests whether specialisation is correct

- Use specialisation only when instance of subclass substitutable for arbitrary instance of superclass

26
Q

DbC

A
  • Software assertions must be met
  • Assertions are pre and post conditions
  • Process of developing software based on notion of contract between objects
  • Allows software to be traced from requirements through to code
27
Q

4 advantages to DbC approach

A
  • Assertions provide accurate documentation
  • Assertions important aid to testing
  • Provide way of controlling inheritance
  • Assertions together with exception-handling mechs can be important aid
28
Q

Sequence diagrams and communication diagrams

A
  • Known collectively as interaction diagrams

- Notations to help and record decisions relating to behaviours defined for each class

29
Q

GRASP expert

A
  • Name. Expert
  • Intent. Assign responsibility
  • How it works. Information expert used
  • When to use it. Use when need to decide which interacting object responsibility should be assigned to
30
Q

GRASP creator

A
  • Name. Creator
  • Intent. Assign responsibility for creating objects
  • How it works. Responsibility for creating instance of class assigned to class that records instances of newly created object
  • When to use it. Use when need to assign responsibility for object creation
31
Q

Class-responsibility-collaboration cards

A
  • More lightweight approach to modelling
  • Used in XP
  • Used by group of people, ensures communication
  • Card has three boxes
  • Boxes hold name, responsibilities and collaborators
32
Q

Law of dementer

A
  • Allows object to send messages to
  • Any objects communicated as parameters of current method
  • Any new objects that object has created in current method
  • Any objects to which object has created in current method - its neighbours
  • itself
33
Q

UML fragments

A
  • Optional
  • Alternative
  • Loop
34
Q

Optional fragment

A
  • Behaviour specified inside fragment only executed if guard shown at top of box is true
35
Q

Alternative fragment

A
  • Used where we want to choose from number of mutually exclusive pieces of behaviour
36
Q

Loop fragment

A
  • Behaviour repeated while a guard, shown in top left corner, remains true
37
Q

Checking the precondition

A
  • Defensive programming - Checking of precondition done by operation itself]
  • DbC - responsibility shifted to caller of the operation
38
Q

Three strategies for implementing use cases

A
  • One-central class
  • Actor
  • Use cases as classes
39
Q

Three main reasons for partitioning a software system

A
  • Manage size and complexity
  • For information hiding
  • For logical decomposition