1 object-oriented analysis use case driven. 2 the outline method for ooa 1.identify object classes...
TRANSCRIPT
![Page 2: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/2.jpg)
2
The outline method for OOA
1.Identify object classes within the problem domain
2.Define the behaviour of those classes
3.Define the attributes and methods of those classes
4.Model the relationships between those classes
From the text book P79.
![Page 3: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/3.jpg)
3
Develop use cases, activity
diagrams
Identify classes, relationships, and
methods
Develop interaction diagrams
Refine and iterate
![Page 5: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/5.jpg)
5
Actors:•An actor is a user playing a role with respect to the system.
![Page 6: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/6.jpg)
6
Actors:•An actor is a user playing a role with respect to the system.•An actor is the key to finding the correct use cases.
![Page 7: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/7.jpg)
7
Actors:•An actor is a user playing a role with respect to the system.•An actor is the key to finding the correct use cases.•An actor can be an external system.
Use cases:
![Page 8: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/8.jpg)
8
Actors:•An actor is a user playing a role with respect to the system.•An actor is the key to finding the correct use cases.•An actor can be an external system.
Use cases:A use case is a sequence of transactions in a system whose task is to yield results of measurable value to an individual actor of the system.
Transaction
![Page 9: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/9.jpg)
9
Actors:•An actor is a user playing a role with respect to the system.•An actor is the key to finding the correct use cases.•An actor can be an external system.
Use cases:A use case is a sequence of transactions in a system whose task is to yield results of measurable value to an individual actor of the system.
Transaction is an atomic set of activities that are performed either fully or not at all.
![Page 10: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/10.jpg)
10
Actors:•An actor is a user playing a role with respect to the system.•An actor is the key to finding the correct use cases.•An actor can be an external system.
Use cases:A use case is a sequence of transactions in a system whose task is to yield results of measurable value to an individual actor of the system.
Transaction is an atomic set of activities that are performed either fully or not at all.
Use case is a special flow of events through the system. However, many courses of events are possible, so we must group the courses of events and call each group a use case class.
![Page 11: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/11.jpg)
11
Library
Borrow books
Return books
Interlibrary loan
Do research
Read books, newspaper
Purchase supplies
Member
Circulation clerk
Supplier
![Page 12: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/12.jpg)
12
Dividing use cases into packages
For example, in a library system, the various scenarios involve a member borrowing books, a member do research, or a supplier providing books.
![Page 14: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/14.jpg)
Irrelevant ClassesIrrelevant Classes
14
Classes identification –
Fuzzy ClassesFuzzy ClassesRelevant ClassesRelevant Classes
![Page 15: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/15.jpg)
15
Classes identification –
1.The noun phrase approach
2.The use case driven (Sequence/collaboration modeling approach)
3.Classes, Responsibilities, and Collaborators (CRC) approach
![Page 16: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/16.jpg)
16
The noun phrase approach
Look for nouns and noun phrases in the use cases.
Some classes are implicit or taken from general knowledge
All classes must make sense in the application domain.
![Page 17: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/17.jpg)
17
Common mistake – use case refers to aprocess (not a class)
Use case can contain many classesThe same class can occur in many different use cases
Example: Using ATM machineStep 1: insert ATM cardStep 2: enter PIN numberStep 3: may/may not do somethingStep 4: Remove the ATM Card
![Page 18: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/18.jpg)
18
A simple ATM system use cases –
Deactivate ATMWithdraw money
Deposit money
Check balance
Transfer money
Print audit log
Cardholder
Bank employee
Validate pin
<<include>>
<<include>>
<<include>>
<<include>>
![Page 19: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/19.jpg)
19
The noun phrase approach
Initial list of noun phrases: Candidate Classes
AccountAccount BalanceAmountApproval ProcessATM CardATM MachineBankBank ClientCardCashCheckChecking Account
ClientClient’s AccountCurrencyDollarEnvelopeFour DigitsFundInvalid PinMoneyPasswordPINPIN Code
RecordSavings AccountSystemStepTeletubbieTransactionTransaction Historyetc.,
![Page 21: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/21.jpg)
21
The noun phrase approach
Eliminate the irrelevant Classes
AccountAccount BalanceAmountApproval ProcessATM CardATM MachineBankBank ClientCardCashCheckChecking Account
![Page 22: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/22.jpg)
22
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
AccountAccount BalanceAmountApproval ProcessATM CardATM MachineBankBank ClientCardCashCheckChecking Account
![Page 23: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/23.jpg)
23
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
![Page 24: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/24.jpg)
24
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
Account, Client’s Account = Account
![Page 25: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/25.jpg)
25
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
Account, Client’s Account = Account
ATM Card, Card = ATM Card
![Page 26: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/26.jpg)
26
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
Account, Client’s Account = Account
ATM Card, Card = ATM Card
Client, Bank Client = Bank Client
![Page 27: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/27.jpg)
27
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
Account, Client’s Account = Account
ATM Card, Card = ATM Card
Client, Bank Client = Bank Client
Fund, Money = Fund
![Page 28: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/28.jpg)
28
The noun phrase approach
Reviewing the Redundant Classes and Building a Common Vocabulary
Account, Client’s Account = Account
ATM Card, Card = ATM Card
Client, Bank Client = Bank Client
Fund, Money = Fund
PIN, PIN Code = PIN
![Page 29: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/29.jpg)
29
The noun phrase approach
Revised list - Reviewing the Redundant Classes and Building a Common vocabulary
![Page 31: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/31.jpg)
31
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
![Page 32: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/32.jpg)
32
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
Amount: A value, not a class
![Page 33: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/33.jpg)
33
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
Amount: A value, not a class
Invalid PIN: It is only a value, not a class
![Page 34: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/34.jpg)
34
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
Amount: A value, not a class
Invalid PIN: It is only a value, not a class
Password: An attribute, possibly of the Bank Client class
![Page 35: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/35.jpg)
35
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
Amount: A value, not a class
Invalid PIN: It is only a value, not a class
Password: An attribute, possibly of the Bank Client class
PIN: An attribute, possibly of the Bank Client class.
![Page 36: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/36.jpg)
36
The noun phrase approach
Reviewing the Possible Attributes
Account Balance: An attribute of the Account class
Amount: A value, not a class
Invalid PIN: It is only a value, not a class
Password: An attribute, possibly of the Bank Client class
PIN: An attribute, possibly of the Bank Client class.
Transaction History: An attribute, possibly of the Transaction class
![Page 37: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/37.jpg)
37
The noun phrase approach
Revised list - Reviewing the Possible Attributes
![Page 38: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/38.jpg)
38
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
![Page 39: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/39.jpg)
39
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings Account
![Page 40: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/40.jpg)
40
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an account
![Page 41: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/41.jpg)
41
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC Bank
![Page 42: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/42.jpg)
42
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC BankBank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions
![Page 43: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/43.jpg)
43
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC BankBank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactionsBank Client class: A client is an individual that has a checking account and/or a savings account
![Page 44: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/44.jpg)
44
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC BankBank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactionsBank Client class: A client is an individual that has a checking account and/or a savings accountChecking Account class: It models a client’s checking account and provides more specialized withdrawal service.
![Page 45: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/45.jpg)
45
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC BankBank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactionsBank Client class: A client is an individual that has a checking account and/or a savings accountChecking Account class: It models a client’s checking account and provides more specialized withdrawal service.Savings Account class: It models a client’s savings account.
![Page 46: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/46.jpg)
46
The noun phrase approach
Reviewing the Class Purpose – each class must have a purpose. If we cannotformulate a statement of purpose for a class, simply eliminate it.
Account class: An Account class is a formal (abstract) class, it defines the common behaviors that can be inherited by more specific classes such as Checking Account and Savings AccountATM Card class: Provides a client with a key to an accountATM Machine class: Provides an interface to the ABC BankBank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactionsBank Client class: A client is an individual that has a checking account and/or a savings accountChecking Account class: It models a client’s checking account and provides more specialized withdrawal service.Savings Account class: It models a client’s savings account.Transaction class: Keeps track of transaction, time, date, type, amount, and balance
![Page 47: 1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of](https://reader036.vdocuments.us/reader036/viewer/2022062423/56649ebb5503460f94bc3a9b/html5/thumbnails/47.jpg)
47
The noun phrase approach
Revised list - Reviewing the Possible Attributes – revised list