CS616 – Software
Engineering II
|
Lecture 9
|
Broad view of design –
exploring:
·
Most common and
important organizing relationship
·
E.g.
Main
Success Scenario (or Basic Flow): |
1. Customer arrives at POS checkout with goods and/or services to
purchase. |
… |
7. Customer pays and System handles payment. |
|
Extensions |
7b.
Paying by credit: Include
Handle Credit Payment |
7c. Paying by check: Include
Handle Check Payment |
… |
Extensions
|
6b. Paying by credit: Include Handle Credit Payment |
… |
… |
Level: Subfunction
Main Success Scenario: |
Extensions: 2a. System detects failure to collaborate with external system: 1. System signals error to Cashier. 2. Cashier asks Customer for alternate payment … |
|
NOTE: Handle Credit Payment subfunction use case was
originally in extension section of Process Sale use case., but factored out to
avoid duplication.
·
Create an extending use
case
·
Within it describe
where and under what conditions it extends the behavior of some base use case
… Extension
Points: VIP
Customer, step 1. Payment, step 7. Main
Success Scenario (or Basic Flow): |
1. Customer arrives at POS checkout with goods and/or services to
purchase. |
… |
7. Customer pays and System handles payment. |
… |
Figure – Use case include relationship
Figure – extend relationship
1. Create generalization-specialization hierarchies
Category |
Examples |
Physical and tangible
objects |
Credit Card, check |
Specifications, designs,
or descriptions of things |
|
Places |
|
Transactions |
CashPayment,
CreditPayment, CheckPayment |
Transaction line items |
|
Role of people |
|
Containers of other things |
|
Things in a container |
|
Other computer or
electro-mechanical systems external to system |
CreditAuthorizationService,
CheckAuthorizationService |
Abstract noun concepts |
|
organizations |
CreditAuthorizationService,
CheckAuthorizationService |
Events |
|
Rules and policies |
|
Catalogs |
|
Records of finance, work,
contracts, legal matters |
AccountsReceivable |
Financial instruments and
services |
|
Manuals, books |
|
Extensions |
7b. Paying by credit: |
1 Customer enters their credit account
information. |
2. System sends payment authorization request
to an external Payment Authorization Service System, and requests payment
approval. |
2a. System detects failure to collaborate with
external system: |
1. System signals error to Cashier. |
2. Cashier asks Customer for alternate payment. |
3. System receives payment approval and
signals approval to Cashier. |
3a. System receives payment denial: |
1. System signals denial to Cashier. |
2. Cashier asks Customer for alternate payment. |
4. System records the credit payment, which
includes the payment approval. |
5 System presents credit payment signature input
mechanism. |
6. Cashier asks Customer for a credit payment signature.
Customer enters signature. |
·
Concepts CashPayment,
CreditPayment, and CheckPayment all similar
·
Organize them into
generalization-specialization class hierarchy
·
Create a conceptual
subclass of a superclass when:
o
The potential
conceptual subclasses represent variations of a similar concept
o
The subclasses will
conform to Is-a rule
o
All subclasses have the
same attribute which can be factored out and expressed and expressed in the
superclass
o
All subclasses have the
same association which can be factored out and related to the superclass
Figure – Justifying Payment subclasses
·
Every member of a class
C must also be a member of a subclass, then class C is called and abstract
conceptual class
·
e.g. every Payment
instance must be an instance of the subclass CashPayment, CreditPayment, and
CheckPayment
·
since every Payment
member is also a member of a subclass, Payment is an abstract conceptual
subclass
Figure – abstract conceptual
classes