Unit 6-Section 2 Flashcards

Dynamic modelling- from analysis to design

1
Q

contract

A

object sends a message to another object

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

How contract comes into

A
  • the client (caller) expects the supplier to perform the service correctly.
    and
  • the supplier expects to be asked to perform only those services.
    knows how to supply.
  • If either of these expectations is not met, the contract has been
    broken.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what is a Pre-Condition in use case diagram?

A

requiring something from the client object,
which is of benefit to the supplier object.

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

What is a post-condition in the use case diagram?

A

requiring something from the supplier
object, which is of benefit to the client object. .

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

What are the Benefits from identifying roles in terms of clients and suppliers? ?

A

Enabling designers to specify the responsibilities of objects more
precisely;
−Allowing clearer software to be built, and, in turn,
−Leading to greater confidence in the correctness of the software.

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

What is Design by Contract (DbC) ?

A

is the process of
developing software based on contract between
objects, where in this process:
* Operations appropriate for each class
* Pre- and post-conditions are specified

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

Assertions?

A

are statements that are used for placing constraints on the
relationship between classes.
details of the requirements that cannot be represented
graphically.

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

Four main advantages to the DbC approach for adding
assertions?

A
  1. Assertions provide accurate documentation for the implemented
    classes
  2. Provided they are executable,
  3. Assertions provide a way of controlling inheritance
  4. provided the programming language has an exception
    mechanism
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can DbC help to improve quality?

A

DbC complements many of the other tools:
*. Static analysis tools: that are used to analyse code to detect defects before
execution such as a compiler that finds all syntax errors.
*.Dynamic analysis tools: such as testing, this occupies 40% of total project
effort

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

critical system

A

are software systems
where failure may have catastrophic
consequences such as:
−Loss of life (safety-critical systems),
−Loss of business (business-critical systems) and
−Failure to meet significant objectives (mission
critical systems).

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

How to use develop a critical systems

A

Formal methods – based on mathematical notations, logic and proof.
−Analysis tools to make the systems as error-free as possible.
−Design by Contract where the most important feature of DbC is allowing the
development of a software system to be traced from requirements through to
code.

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

Contracts in real world

A

In business, contracts are specifications of the obligations of, and benefits to, the
parties involved in an agreement.

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

To weaken a precondition

A

means generalizing the situation in which a
service can be provided.

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

To strengthen a post-condition

A

means making the service that is
requested ‘better’ in terms of time, precision or some other measurable
item.

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

view of contract

A

The form of contract should be written as below:
A description of the task, activity or operation in question;
2.
3.
Precondition: a set of constraints that are assumed to be
true before you can start
Post-condition: a set of constraints that must be true
afterwards.

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

subcontracts in software

A
  1. Through associations (composition, aggregation);
  2. Through generalizations (inheritance).
    This relationship can be expressed in terms of the pre and post
    conditions associated with the equivalent methods in the two
    classes.
17
Q

Constraints on behavior

A

is the process of translating pre and post
conditions (from use cases) into your design, for Object Oriented
systems.(behaviour)
identifying the possible operations for a class:
1. Instances of a class (its objects) that have been created or deleted;
2. Instances of associations (links) that have been formed or broken;
3. Attributes that have been modified.