aseproj doc

41
INF207-E/205/2006 [email protected] http://osprey.unisa.ac.za INF207-E OBJECT-ORIENTED CONCEPTS DEPARTMENT OF SYSTEMS DEVELOPMENT SCHOOL OF COMPUTING UNISA TUTORIAL LETTER 205 FOR INF207-E Solution to Assignment 5

Upload: geniuinebest

Post on 13-Nov-2015

3 views

Category:

Documents


0 download

TRANSCRIPT

  • INF207-E/205/2006

    [email protected]://osprey.unisa.ac.za

    INF207-E

    OBJECT-ORIENTED CONCEPTS

    DEPARTMENT OF SYSTEMS DEVELOPMENTSCHOOL OF COMPUTING

    UNISA

    TUTORIAL LETTER 205 FOR INF207-ESolution to Assignment 5

  • 2TABLE OF CONTENTS

    Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Nota aan Afrikaanssprekende studente . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Tutorial matter that you should have received to date . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3I have lost / did not receive certain study material! . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3How do I download study material or access the discussion forum? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

    Solution to Assignment 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Solution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

  • 3 INF207-E/205

    Introduction

    Nota aan Afrikaanssprekende studente

    Tutorial matter that you should have received to date

    INF207-E/101/2005 General information, study programme, exam admission & assignments

    INF207-E/102/2005 Contact Information

    INF207-E/201/2005 Discussion of Assignment 1

    INF207-E/202/2005 Discussion of Assignment 2

    INF207-E/203/2005 Discussion of Assignment 3

    INF207-E/204/2005 Discussion of Assignment 4

    INF207-E/205/2005 Discussion of Assignment 5 (This tutorial letter)

    I have lost / did not receive certain study material!

    Call the Despatch Department and request a copy of the particular tutorial matter; OR

    Download a copy of the material from the module Web page. The username and password for the downloadarea is available in your COS-ALL/301/2006.

    PLEASE DO NOT CALL/EMAIL LECTURERS IF YOU DO NOT HAVE THE STUDY MATERIAL. WECANNOT PROVIDE IT.

    How do I download study material or access the discussion forum?

    Please refer to your INF207-E/101/2006, INF207-E/201/2006 or COSALL/301/2006 tutorial letters.

    NOTA AAN AFRIKAANSSPREKENDE STUDENTE

    Hierdie studiebrief bevat n bespreking en n moontlike oplossing vir Werkopdrag 3. Aangesien dievoorgeskrewe boek en die studiegids in Engels is, verskaf ons die antwoorde ook in Engels. Indien uenige probleme met die Engels ondervind, kontak asseblief een van die dosente.

  • 4Solution to Assignment 5

    Turn to Appendix A in the prescribed book, the Chocoholics Anonymous project.

    1) Perform the requirements workflow of the Chocoholics Anonymous project. [50]2) Perform the analysis workflow of the Chocoholics Anonymous project. [50]

    Solution

    1) Requirements Workflow of the Chocoholics Anonymous Project

    The initial glossary of the Chocoholics Anonymous project is depicted below:

    Accounts payable Money ChocAn is obligated to pay to providers for services theyhave rendered

    Chocolate A food prepared from ground roasted cacao beans that is trulydelicious but can be addictive.

    Chocoholics Anonymous(ChocAn)

    An organization dedicated to helping people addicted tochocolate in all its glorious forms.

    Electronic fund transfer(EFT)

    An automated process by which funds are transferred from onebank account to another. In the case of ChocAn, funds aretransferred on a weekly basis to the bank accounts of theindividual providers.

    Invalid number A number that identifies a member who is inactive or a numberthat is not in the information system.

    Member number A 9-digit number that uniquely identifies each member of

    ASSIGNMENT 5

    Due Date: 17 July 2006Maximum credits: 100

    Marks: 100

    Study Letter 101 (this letter)Study Letter 501

    SCHACH : Chapters 1-10

    Please use a word processor to do this assignment.

  • 5 INF207-E/205

    ChocAn.Member status Active, Inactive, Suspended.Magnetic tape A data storage medium where the EFT data are kept.Member suspended The member number is valid but the member has not paid his or

    her duesProvider An individual who provides services to paying members of

    ChocAn, including dietitians, internists, and exercise specialists.Provider directory A directory that holds the service codes, descriptions of the

    services, and the amount to be paid for each service.Provider number A 9-digit number that uniquely identifies each ChocAn provider.Provider status Active, Inactive.Provider type Internist, Dietitian, Exercise Specialist.Service code A 6-digit number that uniquely identifies a service provided to a

    member. (For example, 598470 denotes a session with adietitian.)

    Validation The process of checking that the members number is correctand that the member has paid all dues currently owed.

    Visit An occasion on which a consultation, exercise session, or otherservice is provided to a member.

    Initial ChocAn glossary

    Provider

    ChocAnInformation

    System

    Member

    MaintainMember

    MaintainProvider

    VerifyMember Status

    Add Visit

    Print MemberReport

    Print ProviderReport

    Print ManagerReport

    Print EFTReport

    include

    Figure 1. Use-case diagram for ChocAn.

  • 6The use case Maintain Member combines use cases Add Member and Update Member, and similarly forMaintain Provider. The use-case diagram is shown in Figure 1. Descriptions of the use cases appear inFigures 2 through 8.

    Brief description:

    The Maintain Member use case enables a provider to enter new member data or update existingmember data given by the member.Step-by-step description:

    1. The provider enters or updates data given by the member: NameAddressCityStateZIP codeDate of last paymentStatus (Active, Inactive, Suspended)

    Figure 2. Description of the Maintain Member use case for ChocAn.

    Brief description:

    The Maintain Provider use case enables a provider to enter new provider data or update existingprovider data.Step-by-step description:

    1. The provider enters or updates provider information including:NameAddressCityStateZIP codeType (Internist, Dietitian, Exercise Specialist)Status (Active, Inactive)

    Figure 3. Description of the Maintain Provider use case for ChocAn.

  • 7 INF207-E/205

    Brief description:

    The Verify Member Status use case enables the provider to validate a members status byentering the member number into the system.Step-by-step description:

    1 The provider enters the member number that is to be validated.

    2. The ChocAn information system informs the provider regarding the member status.Figure 4. Description of the Verify Member Status use case for ChocAn.

    Brief description:

    The Add Visit use case enables a provider to enter details of a members visit into the ChocAninformation system.Step-by-step description:

    1. The provider enters the member number.

    2 The ChocAn information system checks whether the member number is valid. If so, theprovider enters his or her provider number.

    3. Then information is written by the ChocAn information system to a file, including:Current date and timeDate of visitProvider name, number, and typeMember name and numberService code, name, and description of visitAdditional comments

    Figure 5. Description of the Add Visit use case for ChocAn.

  • 8Brief description:

    The Print Member Report use case enables a member to receive a list of all the services providedto that member during the current week.Step-by-step description:

    1. The ChocAn information system prints a report of all visits by each member during thecurrent week, including:

    Member name, number, address, city, state, ZIP code.For each service provided:

    Date of serviceProvider nameService name

    Figure 6. Description of the Print Member Report use case for ChocAn.

    Brief description:

    The Print Provider Report use case enables a provider to receive a list of all the servicesprovided by that provider during the current week. Step-by-step description:

    1. The ChocAn information system prints a report of services provided by each provider duringthe current week, including:

    Provider name, number, address, city, state, ZIP code.For each service provided:

    Date of serviceDate and time data received from computerMember name and numberService codeFee to be paid

    Total number of consultations with membersTotal fee for the week

    Figure 7. Description of the Print Provider Report use case for ChocAn.

  • 9 INF207-E/205

    Brief description:

    The Print EFT Report enables the ChocAn information system to print a list of funds to betransferred to the providers bank accounts.Step-by-step description:

    1. The ChocAn information system prints the EFT report including:Provider name and numberAmount to be transferred to providers account

    Figure 8. Description of the Print EFT Report use case for ChocAn.

    Brief description:

    The Print Manager Report use case enables a ChocAn manager to print the Accounts Payablereport summarizing the fees to be paid for the current week and the total number of visits toproviders.Step-by-step description:

    1. The ChocAn information system prints a report including:The name of every provider to be paid for the current weekThe number of consultations each provider hadHis or her total fee for the weekThe total number of providers who had visits that weekThe total number of consultations for the weekThe overall fee total

    Figure 9. Description of the Print Manager Report use case for ChocAn.

    The initial business model includes all the use cases of Figure 1, together with their descriptions.The initial requirements include all the use cases of Figure 1, together with their descriptions.

  • 10

    2) Analysis Workflow of the Chocoholics Anonymous Project

    In this solution, subheadings are underlined.

    Scenarios for the use cases of Figure 1 appear in Figures 10 through 19.

    A provider wishes to add a new member.

    1. The provider enters new member information:Member nameMember addressMember cityMember stateMember ZIP codeDate last paidMember status (Active, Inactive, Suspended)

    2. The system displays a message that the member has been successfully added.Figure 10. First scenario of the Maintain Member use case of the ChocAn information system.

    A provider wishes to modify current member information.

    1. The provider locates the current member record by searching by member name or membernumber.

    2. The provider edits the member information:Member nameMember addressMember cityMember stateMember ZIP codeDate last paidMember status (Active, Inactive, Suspended)

    3. The system displays a message that the member information has been successfully modified.Figure 11. Second scenario of the Maintain Member use case of the ChocAn information system.

  • 11 INF207-E/205

    A provider wishes to add a new provider.

    1. The provider enters new provider information:Provider nameProvider addressProvider cityProvider stateProvider ZIP codeDate last paidProvider type (Dietitian, Internist, Exercise Specialist) Provider status (Active, Inactive, Suspended)

    2. The system displays a message that the provider has been successfully added.Figure 12 First scenario of the Maintain Provider use case of the ChocAn information system.

    A provider wishes to modify current provider information.

    1. The provider locates the current provider record by searching by provider name or providernumber.

    2. The provider edits the provider information:Member nameMember addressMember cityMember stateMember ZIP codeDate last paidMember status (Active, Inactive, Suspended)

    3. The system displays a message that the provider information has been successfully modified.Figure 13. Second scenario of the Maintain Provider use case of the ChocAn information system.

    1. A provider enters a member number to verify member status

    2. The system determines whether the member is active, inactive, suspended, or not found.Figure 14 Scenario of the Verify Member Status use case of the ChocAn information system.

  • 12

    A member visits a provider.

    1. The provider enters the member number to verify member status.

    2. The system determines that the member is active.

    3. The provider enters his or her provider number.

    4. The system determines that the provider is active.

    5. The provider enters the date of the visit.

    6. The name and number of all services available from that provider are displayed on the screenby the system.

    7. The provider enters the service number for that visit.

    8. The system displays the corresponding service.

    9. The provider verifies that the service selected is correct.

    10. The provider enters optional comments.

    11. The system stores the visit information:Current date and timeDate of visitMember name and numberService codeFee charged for service

    12. The system displays a message that the visit has been successfully added.Figure 15. Scenario for the Add Visit use case of the ChocAn information system.

  • 13 INF207-E/205

    A ChocAn manager wishes to print a member report.

    1 The ChocAn information system prints a report of all visits by each member during thecurrent week, including:

    Member name, number, address, city, state, ZIP code.For each service provided:

    Date of serviceProvider name

    Service name

    Figure 16. Scenario for the Print Member Report use case of the ChocAn information system.

    A ChocAn manager wishes to print a provider report.

    1 The ChocAn information system prints a report of services provided by each provider duringthe current week, including:

    Provider name, number, address, city, state, ZIP code.For each service provided:

    Date of serviceDate and time data received from computerMember name and numberService codeFee to be paid

    Total number of consultations with membersTotal fee for the week

    Figure 17. Scenario for the Print Provider Report use case of the ChocAn information system.

    A ChocAn manager wishes the EFT report to be printed.

    1 The ChocAn information system prints the EFT report including:Provider name and numberAmount to be transferred to providers account

    Figure 18. Scenario for the Print EFT Report use case of the ChocAn information system.

  • 14

    A ChocAn manager wishes to print a manager report.

    1 The ChocAn information system prints a report of services provided by each provider duringthe current week, including:

    The name of every provider to be paid for the current weekThe number of consultations each provider hadHis or her total fee for the weekThe total number of providers who had visits that weekThe total number of consultations for the weekThe overall fee total

    Figure 19. Scenario for the Print Manager Report use case of the ChocAn information system.

    Candidate entity classes are determined using noun extraction.

    Description of information system in a single paragraph: For a monthly fee, members of ChocAn are entitled to unlimited visits to providers. The servicesof the providers include those of internists, dietitians, and exercise experts. Reports areprinted each week regarding members, providers, and the overall fees payable to providers.

    Identify the nouns: For a monthly fee, members of ChocAn are entitled to unlimited visits to providers. The services of the providers include those of internists, dietitians, and exercise experts. Reports areprinted each week regarding members, providers, and the overall fees payable to providers.

    With regard to the nouns in the previous paragraph, internist, dietitian, and exercise expert could betreated two ways. First, they could be considered subclasses of Provider Class. Second, they could beconsidered attributes of Provider Class. For simplicity, we adopt the second choice, noting that it iseasier to add subclasses than to remove them. Also, fee, ChocAn, report, and week are abstract nouns. This leaves Member Information Class, Visit Information Class, Provider Information Class, andService Information Class as the candidate entity classes.

    Now comparing scenarios 10 and 11 with scenarios 12 and 13, it is clear that we need to declare a classPerson Information Class as a superclass of Member Information Class and Provider Information Class. [A hint in this regard is given to the student in Appendix ABoth providers and members have name,number, address, city, state, and ZIP code attributes].

  • 15 INF207-E/205

    The initial class diagram is shown in Figure 20.

    ServiceInformation Class

    VisitInformation Class

    PersonInformation Class

    MemberInformation Class

    ProviderInformation Class

    ChocAnApplication Class

    Figure 20. The initial class diagram for the ChocAn information system.

    The initial boundary classes are:ChocAn Interface ClassGet Input ClassMember Report ClassProvider Report ClassEFT Report ClassManager Report Class

    The initial control classes are:Maintain Member ClassMaintain Provider ClassRequest Service Class

  • 16

    ChocAn Information System Loop

    add visitselected

    member statusselected

    maintain providerselected

    maintain memberselected

    quitselected

    Add visitinformation formember

    MaintainingMember

    Mdify or add memberinformation

    AddingVisit

    VerifyingMember Status

    Modify or addprovider information

    Verify status ofmember

    MaintainingProvider

    Print member,provider (EFT), ormanager report

    PrintingReports

    print reportsselected

    Add Visit ClassCreate Reports Class

    The initial statechart is shown in Figure 21.

    Figure 21. The initial statechart of the ChocAn information system.

  • 17 INF207-E/205

    Member

    The member providesdata for the providerto enter

    Provider ChocAnInterface

    Class

    MaintainMember

    Class

    MemberInfo

    Class

    GetInputClass

    Figure 22. Class diagram showing the classes that realize the Maintain Member and VerifyMember Status use cases of the ChocAn information system.

    Member

    The member providesdata for the providerto enter

    Provider : ChocAnInterface

    Class

    : MaintainMember

    Class

    : MemberInfo

    Class

    : GetInputClass

    1: Select Add Member option

    2: Transferselection

    5: Add newmember

    6: Send acknow-ledgment

    3: Supply new member data

    4: Return new member data

    7: Send acknow-ledgment

    8: Display acknow-ledgment

    Figure 23. A collaboration diagram of the realization of the scenario of Figure 10 of theMaintain Member use case of the ChocAn information system.

    Use case Maintain Member:

  • 18

    The class diagram is shown in Figure 22.

    Consider the scenario of Figure 10, the first scenario of the Maintain Member use case. The collaborationdiagram is shown in Figure 23, the flow of events in Figure 24, and the corresponding sequence diagram inFigure 25.

    The provider enters data provided by the new member (13). The ChocAn information systemis updated accordingly (45). An acknowledgment is displayed (68).

    Figure 24. The flow of events of the realization of the scenario of Figure 23 of the Maintain Member usecase of the ChocAn information system.

    Provider : ChocAn InterfaceClass: Maintain Member

    Class: Member Info

    Class: Get Input

    ClassMember

    Data providedby the memberfor the providerto enter

    1: Select Add Member option

    2: Transfer selection

    5: Add new member

    6: Send acknowledgment

    3: Supply new member data

    4: Return newmember data

    7: Send acknowledgment 8: Display

    acknowledgment

    Figure 25. A sequence diagram equivalent to the collaboration diagram ofFigure 23. The flow of events is therefore as shown in Figure 24.

  • 19 INF207-E/205

    Member

    The member providesdata for the providerto enter

    Provider : ChocAnInterface

    Class

    : MaintainMember

    Class

    : MemberInfo

    Class

    : GetInputClass

    1: Select ModifyMember option

    2: Transferselection

    5: Modifymember data

    6: Send acknow-ledgment

    3: Supply modified member data

    4: Return modified member data

    7: Send acknow-ledgment

    8: Display acknow-ledgment

    Figure 26. A collaboration diagram of the realization of the scenario of Figure11 of the Maintain Member use case of the ChocAn informationsystem.

    The provider enters modified data provided by the member (13). The ChocAn informationsystem is updated accordingly (45). An acknowledgment is displayed (68).

    Figure 27. The flow of events of the realization of the scenario of Figure 23 of theMaintain Member use case of the ChocAn information system.

    Now consider the scenario of Figure 11, the second scenario of the Maintain Member use case. Thecollaboration diagram is shown in Figure 26, the flow of events in Figure 27, and the correspondingsequence diagram in Figure 28.

  • 20

    Provider : ChocAn InterfaceClass: Maintain Member

    Class: Member Info

    Class: Get Input

    ClassMember

    Data providedby the memberfor the providerto enter

    6: Send acknowledgment

    7: Send acknowledgment 8: Display acknow-

    ledgment

    1: Select ModifyMember option

    2: Transfer selection

    5: Modify member data

    3: Supply modified member data

    4: Return modified member data

    Figure 28. A sequence diagram equivalent to the collaboration diagram ofFigure 26. The flow of events is therefore as shown in Figure 27.

    Provider ChocAnInterface

    Class

    MaintainProvider

    Class

    ProviderInfo

    Class

    GetInputClass

    Figure 29. Class diagram showing the classes that realize the Maintain Provideruse case of the ChocAn information system.

  • 21 INF207-E/205

    Provider : ChocAnInterface

    Class

    : MaintainProvider

    Class

    : ProviderInfo

    Class

    : GetInputClass

    6: Send acknow-ledgment

    1: Select Add Provider option

    2: Transferselection

    5: Add newprovider

    3: Supply new provider data

    4: Return new provider data

    7: Send acknow-ledgment

    8: Display acknow-ledgment

    Figure 30. A collaboration diagram of the realization of the scenario of Figure12 of the Maintain Provider use case of the ChocAn informationsystem.

    Use case Maintain Provider:

    The class diagram is shown in Figure 29.

    Consider the scenario of Figure 12, the first scenario of the Maintain Provider use case. The collaborationdiagram is shown in Figure 30, the flow of events in Figure 31, and the corresponding sequence diagram inFigure 32.

    The new provider enters data (13). The ChocAn information system is updated accordingly (45).An acknowledgment is displayed (68).

    Figure 31. The flow of events of the realization of the scenario of Figure 7.75 of theMaintain Provider use case of the ChocAn information system.

  • 22

    Provider : ChocAn InterfaceClass: Maintain Provider

    Class: Provider Info

    Class: Get Input

    Class

    1: Select Add Provider option

    2: Transfer selection

    5: Add new provider

    6: Send acknowledgment

    3: Supply new provider data

    4: Return new provider data

    7: Send acknowledgment 8: Display acknow-

    ledgment

    Figure 32. A sequence diagram equivalent to the collaboration diagram of Figure 30. Theflow of events is therefore as shown in Figure 31.

    Provider : ChocAnInterface

    Class

    : MaintainProvider

    Class

    : ProviderInfo

    Class

    : GetInputClass

    6: Send acknow-ledgment

    1: Select ModifyProvider option

    2: Transferselection

    5: Modifyprovider data

    3: Supply modified provider data

    4: Return modified provider data

    7: Send acknow-ledgment

    8: Display acknow-ledgment

    Figure 33. A collaboration diagram of the realization of the scenario of Figure 11 of theMaintain Member use case of the ChocAn information system.

  • 23 INF207-E/205

    The provider enters modified data (13). The ChocAn information system is updated accordingly(45). An acknowledgment is displayed (68).

    Figure 34. The flow of events of the realization of the scenario of Figure 13 of theMaintain Provider use case of the ChocAn information system.

    Now consider the scenario of Figure 13, the second scenario of the Maintain Provider use case. Thecollaboration diagram is shown in Figure 33, the flow of events in Figure 34, and the correspondingsequence diagram in Figure 35.

    Provider : ChocAn InterfaceClass: Maintain Provider

    Class: Provider Info

    Class: Get Input

    Class

    6: Send acknowledgment

    7: Send acknowledgment 8: Display acknow-

    ledgment

    1: Select ModifyProvider option

    2: Transfer selection

    5: Modify provider data

    3: Supply modified provider data

    4: Return modified provider data

    Figure 35. A sequence diagram equivalent to the collaboration diagram ofFigure 33. The flow of events is therefore as shown in Figure 34.

  • 24

    Member

    The member providesdata for the providerto enter

    Provider : ChocAnInterface

    Class

    : MaintainMember

    Class

    : MemberInfo

    Class

    : GetInputClass

    1: Select Verify Member Statusoption

    2: Transferselection

    5: Requestmember status

    6: Return memberstatus

    3: Request member number

    4: Return membernumber

    7: Return memberstatus

    8: Display memberstatus

    Figure 36. A collaboration diagram of the realization of the scenario of Figure12 of the Verify Member Status use case of the ChocAn informationsystem.

    The provider enters the member number, supplied by the member (14). The ChocAn informationsystem returns the member status (57), which is then displayed (8).

    Figure 37. The flow of events of the realization of the scenario of Figure 14 of the VerifyMember Status use case of the ChocAn information system.

  • 25 INF207-E/205

    Use case Verify Member Status:

    The class diagram is shown in Figure 22.

    Consider the scenario of Figure 14 of the Verify Member Status use case. The collaboration diagram isshown in Figure 36, the flow of events in Figure 37, and the corresponding sequence diagram in Figure 38.

    Provider : ChocAn InterfaceClass: Maintain Member

    Class: Member Info

    Class: Get Input

    ClassMember

    Data provided by the member for the provider to enter

    2: Transfer selection

    7: Return member status

    8: Display memberstatus

    1: Select Verify MemberStatus option

    5: Request member status

    6: Return member status

    3: Request membernumber

    4: Return membernumber

    Figure 38. A sequence diagram equivalent to the collaboration diagram of Figure36. The flow of events is therefore as shown in Figure 37.

  • 26

    Provider ChocAnInterface

    Class

    Add VisitClass

    VisitInfo

    Class

    GetInputClass

    MaintainProvider

    Class

    ProviderInfo

    Class

    ServiceInfo

    Class

    MemberInfo

    Class

    : MaintainMember

    Class

    Member

    The member providesdata for the providerto enter

    RequestServiceClass

    Figure 39. Class diagram showing the classes that realize the Add Visit use caseof the ChocAn information system.

  • 27 INF207-E/205

    Use case Add Visit:

    The class diagram is shown in Figure 39.

    Provider : ChocAnInterface

    Class

    : Add VisitClass

    : VisitInfo

    Class

    : GetInputClass

    : MaintainProvider

    Class

    : ProviderInfo

    Class

    : ServiceInfo

    Class

    : MemberInfo

    Class

    1: Select AddVisit option

    2: Transferselection

    21: Record visitinformation

    22: Transfer visitinformation

    3: Request membernumber

    19: Request comments and date of visit

    4: Return membernumber

    20: Return comments anddate of visit

    : MaintainMember

    Class

    5: Transfer membernumber

    6: Requestmemberinformation

    7: Returnmemberinformation

    Member

    The member providesdata for the providerto enter

    8: Transfermemberinformation

    10: Requestproviderinformation

    11: Returnproviderinformation

    9: Transferprovidernumber

    12: Transferproviderinformation

    : RequestServiceClass

    14: Requestsevice code

    16: Approveservice name

    15: Return service name

    17: Return serviceinformation

    13: Requestservicedata

    18: Transfer serviceinformation

    23: Transfer visitinformation

    24: Display visitinformation

    Figure 40. A collaboration diagram of the realization of the scenario of Figure 15 of theAdd Visit use case of the ChocAn information system.

  • 28

    The provider enters the member provided by the member (14). The ChocAn information systemdetermines the member's status and other member information (58). Now the provider numberis used to obtain provider information (912). Next, the service code is entered (1314) and theservice name returned, displayed for the provider's approval (15-16), and used to return serviceinformation (1718). The provider provides comments and the date of visit (1920). Visitinformation is then recorded and displayed (2124).

    Figure 41. (The box above is the figure - as done by the process in the textbook (seep.117).) The flow of events of the realization of the scenario of Figure 15 ofthe Add Visit use case of the ChocAn information system.

    Consider the scenario of Figure 15, a scenario of the Add Visit use case. The collaboration diagram isshown in Figure 40, the flow of events in Figure 41, and the corresponding sequence diagram in Figure 42.

  • 29 INF207-E/205

    19: Request comment and date of visit

    20: Return commentsand date of visit

    21: Record visit information

    23: Transfer visitinformation

    Provider : Add VisitClass: Maintain Member

    Class: Get Input

    ClassMember

    Data providedby the memberfor the providerto enter

    8: Transfer member information

    1: Select Add Visit option

    2: Transfer selection

    5: Transfer member number

    3: Request membernumber

    4: Return membernumber

    : ChocAn InterfaceClass

    : Member InfoClass

    6: Request member information

    7: Return member information

    9: Transfer provider number

    13: Request service data

    23: Display visitinformation

    Figure 42. A sequence diagram equivalent to the collaboration diagram of Figure 40. Theflow of events is therefore as shown in Figure 41 (Part 1 of 2).

  • 30

    22: Transfer visit information

    14: Request servicecode

    15: Return servicename

    16: Approve servicename

    17: Return serviceinformation

    18: Transfer service information

    : Visit InfoClass

    : Service InfoClass

    : Request ServiceClass

    : Provider InfoClass

    12: Transfer providerinformation

    : Maintain ProviderClass

    10: Request providerinformation

    11: Return providerinformation

    Figure 42. A sequence diagram equivalent to the collaboration diagram of Figure 40. Theflow of events is therefore as shown in Figure 41 (Part 2 of 2).

  • 31 INF207-E/205

    ChocAnInterface

    Class

    CreateReportClass

    MemberReportClass

    MemberInfo

    Class

    Figure 43. Class diagram showing the classes that realize the Print Member Report usecase of the ChocAn information system.

    Provider : ChocAnInterface

    Class

    : CreateReportClass

    : MemberReportClass

    1: Select Print Reports option 2: Select PrintMember Report

    5: Print memberreport

    6: Send acknow-ledgment

    3: Request member information

    4: Return memberinformation

    7: Send acknow-ledgment

    8: Display acknow-ledgment

    : MemberInfo

    Class

    Figure 44. A collaboration diagram of the realization of the scenario of Figure 10 of thePrint Member Report use case of the ChocAn information system.

  • 32

    Use case Print Member Report:

    The class diagram is shown in Figure 43.

    Consider the scenario of Figure 16 of the Print Member Report use case. The collaboration diagram isshown in Figure 44, the flow of events in Figure 45, and the corresponding sequence diagram in Figure 46.

    The provider requests that a report be printed (1) and that it be the member report (2).Information regarding the member is obtained (34), the report printed (5), and anacknowledgment is displayed (68).

    Figure 45. The flow of events of the realization of the scenario of Figure 44 of the PrintMember Report use case of the ChocAn information system.

    Provider : ChocAn InterfaceClass

    6: Send acknowledgment

    7: Send acknowledgment

    8: Display acknow-ledgment

    1: Select PrintReports option

    2: Select PrintMember Report

    5: Print member report

    3: Request member information

    4: Return memberinformation

    : CreateReport Class

    : Member InfoClass

    : Member ReportClass

    Figure 46. A sequence diagram equivalent to the collaboration diagram of Figure 44. Theflow of events is therefore as shown in Figure 45.

  • 33 INF207-E/205

    Provider : ChocAnInterface

    Class

    : CreateReportClass

    : ProviderReportClass

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    Figure 47. Class diagram showing the classes that realize the Print Provider Report usecase of the ChocAn information system.

    Use case Print Provider Report:

    The class diagram is shown in Figure 47.

    Consider the scenario of Figure 17 of the Print Provider Report use case. The collaboration diagram isshown in Figure 48, the flow of events in Figure 49, and the corresponding sequence diagram in Figure 50.

  • 34

    Provider: ChocAnInterface

    Class

    : CreateReportClass

    : ProviderReportClass

    1: Select Print Reports option

    2: Select ProviderReport

    7: Print providerreport

    8: Send acknow-ledgment

    3: Requestproviderinformation

    4: Returnproviderinformation

    9: Send acknow-ledgment

    10: Display acknow-ledgment

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    5: Requestserviceinformation

    6: Returnserviceinformation

    Figure 48. A collaboration diagram of the realization of the scenario of Figure 17 of thePrint Provider Report use case of the ChocAn information system.

    The provider requests that a report be printed (1) and that it be the provider report (2).Information regarding each provider (34) and the services provided by that provider (56) isobtained and incorporated in the provider report. The provider report is printed (7), and anacknowledgment is displayed (810).

    Figure 49. The flow of events of the realizations of the scenario of Figure 48 of the PrintProvider Report use case of the ChocAn information system.

  • 35 INF207-E/205

    4: Return providerinformation

    Provider : Create ReportClass: Provider Info

    Class: ChocAn Interface

    Class: Service Info

    Class

    5: Request service information

    6: Return service information

    : Provider ReportClass

    1: Select Print Reports option 2: Select Print

    ProviderReport

    7: Print provider report

    3: Request providerinformation

    9: Send acknow-ledgment10: Display

    acknow-ledgment

    8;: Send acknowledgment

    Figure 50. A sequence diagram equivalent to the collaboration diagram of Figure 48. Theflow of events is therefore as shown in Figure 49.

    Use case Print EFT Report:

    The class diagram is shown in Figure 51.

    Consider the scenario of Figure 18 of the Print EFT Report. The collaboration diagram is shown in Figure52, the flow of events in Figure 53, and the corresponding sequence diagram in Figure 54.

  • 36

    Provider : ChocAnInterface

    Class

    : CreateReportClass

    : EFTReportClass

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    Figure 51. Class diagram showing the classes that realize the Print EFT Report use caseof the ChocAn information system.

  • 37 INF207-E/205

    Provider: ChocAnInterface

    Class

    : CreateReportClass

    : EFTReportClass

    1: Select Print Reports option

    2: Select EFT Report

    7: Print EFTreport

    8: Send acknow-ledgment

    3: Requestproviderinformation

    4: Returnproviderinformation

    9: Send acknow-ledgment

    10: Display acknow-ledgment

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    5: Requestserviceinformation

    6: Returnserviceinformation

    Figure 52. A collaboration diagram of the realization of the scenario of Figure 18 of thePrint EFT Report use cases of the ChocAn information system.

    The provider requests that a report be printed (1) and that it be the EFT report (2).Information regarding each provider (34) and the services provided by that provider (56) isobtained and incorporated in the EFT report. The EFT report is printed (7), and anacknowledgment is displayed (810).

    Figure 53. The flow of events of the realizations of the scenario of Figure 52 of the PrintEFT Report use cases of the ChocAn information system.

  • 38

    4: Return providerinformation

    Provider : Create ReportClass: Provider Info

    Class: ChocAn Interface

    Class: Service Info

    Class

    5: Request service information

    6: Return service information

    : EFT ReportClass

    1: Select Print Reports option 2: Select Print

    Providerreport

    7: Print provider report

    3: Request providerinformation

    9: Send acknow-ledgment10: Display

    acknow-ledgment

    8;: Send acknowledgment

    Figure 54. A sequence diagram equivalent to the collaboration diagram of Figure 52. Theflow of events is therefore as shown in Figure 53.

  • 39 INF207-E/205

    Provider : ChocAnInterface

    Class

    : CreateReportClass

    : ManagerReportClass

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    Figure 55. Class diagram showing the classes that realize the Print Manager Report usecase of the ChocAn information system.

    Use case Print Manager Report:

    The class diagram is shown in Figure 55.

    Consider the scenario of Figure 19 of the Print Manager Report use case. The collaboration diagram isshown in Figure 56, the flow of events in Figure 57, and the corresponding sequence diagram in Figure 58.

  • 40

    Provider: ChocAnInterface

    Class

    : CreateReportClass

    : ManagerReportClass

    1: Select Print Reports option

    2: Select PrintManager Report

    7: Print managerreport

    8: Send acknow-ledgment

    3: Requestproviderinformation

    4: Returnproviderinformation

    9: Send acknow-ledgment

    10: Display acknow-ledgment

    : ProviderInformation

    Class

    : ServiceInformation

    Class

    5: Requestserviceinformation

    6: Returnserviceinformation

    Figure 56. A collaboration diagram of the realization of the scenario of Figure19 of the Print Manager Report use case of the ChocAn informationsystem.

    The provider requests that a report be printed (1) and that it be the print manager report (2).Information regarding each provider (34) and the services provided by that provider (56) areobtained and incorporated in the print manager report. The report is printed, and anacknowledgment is displayed (810).

    Figure 57. The flow of events of the realization of the scenario of Figure 56 of the Print Manager Report use case of the ChocAn information system.

  • 41 INF207-E/205

    4: Return providerinformation

    Provider : Create ReportClass: Provider Info

    Class: ChocAn Interface

    Class: Service Info

    Class

    5: Request service information

    6: Return service information

    : Manager ReportClass

    1: Select Print Reports option 2: Select Print

    ManagerReport

    7: Print manager report

    3: Request providerinformation

    9: Send acknow-ledgment10: Display

    acknow-ledgment

    8;: Send acknowledgment

    Figure 58. A sequence diagram equivalent to the collaboration diagram ofFigure 56. The flow of events is therefore as shown in Figure 57.

    UNISA 2006