Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 1 Object-Oriented Analysis Use Case Driven

2 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.

3 3 Develop use cases, activity diagrams Identify classes, relationships, and methods Develop interaction diagrams Refine and iterate

4 4 Actors:

5 5 An actor is a user playing a role with respect to the system.

6 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.

7 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:

8 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

9 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.

10 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.

11 11 Library Borrow books Return books Interlibrary loan Do research Read books, newspaper Purchase supplies Member Circulation clerk Supplier

12 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.

13 13 How to use > and >

14 Irrelevant Classes 14 Classes identification – Fuzzy Classes Relevant Classes

15 15 Classes identification – 1.The noun phrase approach 2.The use case driven (Sequence/collaboration modeling approach) 3.Classes, Responsibilities, and Collaborators (CRC) approach

16 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.

17 17 Common mistake – use case refers to a process (not a class) Use case can contain many classes The same class can occur in many different use cases Example: Using ATM machine Step 1: insert ATM card Step 2: enter PIN number Step 3: may/may not do something Step 4: Remove the ATM Card

18 18 A simple ATM system use cases – Deactivate ATM Withdraw money Deposit money Check balance Transfer money Print audit log Cardholder Bank employee Validate pin >

19 19 The noun phrase approach Initial list of noun phrases: Candidate Classes Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,

20 20 The noun phrase approach Eliminate the irrelevant Classes

21 21 The noun phrase approach Eliminate the irrelevant Classes Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,

22 22 The noun phrase approach Reviewing the Redundant Classes and Building a Common Vocabulary Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,

23 23 The noun phrase approach Reviewing the Redundant Classes and Building a Common Vocabulary

24 24 The noun phrase approach Reviewing the Redundant Classes and Building a Common Vocabulary Account, Client’s Account = Account

25 25 The noun phrase approach Reviewing the Redundant Classes and Building a Common Vocabulary Account, Client’s Account = Account ATM Card, Card = ATM Card

26 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

27 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

28 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

29 29 The noun phrase approach Revised list - Reviewing the Redundant Classes and Building a Common vocabulary Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password * PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,

30 30 The noun phrase approach Reviewing the Possible Attributes

31 31 The noun phrase approach Reviewing the Possible Attributes Account Balance: An attribute of the Account class

32 32 The noun phrase approach Reviewing the Possible Attributes Account Balance: An attribute of the Account class Amount: A value, not a class

33 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

34 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

35 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.

36 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

37 37 The noun phrase approach Revised list - Reviewing the Possible Attributes Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password * PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,

38 38 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate a statement of purpose for a class, simply eliminate it.

39 39 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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

40 40 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account

41 41 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank

42 42 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank Bank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions

43 43 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank Bank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions Bank Client class: A client is an individual that has a checking account and/or a savings account

44 44 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank Bank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions Bank Client class: A client is an individual that has a checking account and/or a savings account Checking Account class: It models a client’s checking account and provides more specialized withdrawal service.

45 45 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank Bank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions Bank Client class: A client is an individual that has a checking account and/or a savings account Checking 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.

46 46 The noun phrase approach Reviewing the Class Purpose – each class must have a purpose. If we cannot formulate 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 ATM Card class: Provides a client with a key to an account ATM Machine class: Provides an interface to the ABC Bank Bank class: Bank clients belongs to the Bank. It is a repository of accounts and processes the accounts’ transactions Bank Client class: A client is an individual that has a checking account and/or a savings account Checking 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

47 47 The noun phrase approach Revised list - Reviewing the Possible Attributes – revised list Account Account Balance Amount Approval Process ATM Card ATM Machine Bank Bank Client Card Cash Check Checking Account Client Client’s Account Currency Dollar Envelope Four Digits Fund Invalid Pin Money Password * PIN PIN Code Record Savings Account System Step Teletubbie Transaction Transaction History etc.,


Download ppt "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."

Similar presentations


Ads by Google