DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Use Case Semantics

  1. #1
    Jason Mowat Guest

    Use Case Semantics

    Greets,

    I have a question regarding use case design. I'll use an example that
    parallels my problem, but that isn't esoteric.

    I have an ATM machine. I want my clients to be able to withdraw money.
    Asuuming that I have use cases built to handle the identification and
    verification of the client, I want to further specify a use case that will
    allow the client to specify a specific denomination of cash.

    For example, my client chooses to withdraw cash by selecting a "Withdraw"
    option on the ATM. They then select their account with which to withdraw
    from via a "Choose Account" option. They are then presented with a list of
    denomination options: 10, 20, 30, 40, Other.

    The question: How would I represent the denominations in a use case diagram?

    I would create a use case called "Withdraw", and describe that the actor
    wishes to take out money from their account. This would be an association
    off of the actor. I would have another use case called "Choose Account",
    which would show the valid accounts the actor could choose from. This would
    be an <<include>> dependancy off of the "Withdraw" use case. The main
    confusion for me is how to represent the denominations? Do I include the
    selection of each denomination as separate use cases that have include
    dependencies to the "Withdraw" use case, or do I simply create a single use
    case called "Choose Denomination" that is an include dependancy off of
    "Withdraw". I would then go into detail in this use case to describe how
    there would be 10, 20, 30, etc... denominations to choose from?

    Again, we couldcontinue with this example by verifying account has
    sufficienct funds, etc, but my goal is to answer the above question. It
    will definately impact my design strategies.



  2. #2
    Guy Smith Guest

    Re: Use Case Semantics


    If I understand, you will present the user with some preset denomination values
    to select and, if they don't want any of the presets, they need to type in
    a different value?

    Your getting too detailed. Your use case shouldn't follow the flow of the
    user interface. Put the need to select a denomination as one of the steps
    in the text description of the "withdraw" use case i.e. "User enters the
    denomination to withdraw". Notice that this doesn't say "how", just that
    they need to. Providing default values to choose, etc. are specifics of
    "how" the user enters the denomination. The ability to give preset values
    would be documented somewhere down the line probably in a user interface
    diagram some where.

    Wouldn't it make more sense to select an account prior to selecting the action
    to do on it? Then the user could withdraw, deposit and get balance
    on the account multiple times. But I guess this is just an example so it
    doesn't matter.

    If this example missed the point of what you are asking let me know and I'll
    see if I can help.

    Guy Smith




  3. #3
    Jason Mowat Guest

    Re: Use Case Semantics

    Guy,

    Thanks for the informative response. It makes things a lot more clearer.

    Here is another question regarding UML and collaborations:

    Assume I have an actor, called system_1, whose sole purpose is to create a
    special audit file. I create my use case(s) to model this system, and
    package it as necessary (let's call it "Audit System"). The actor is the
    "system_1" and the use case's behavior is to produce an audit file (named
    "Produce Audit File").

    I also have another system that processes the audit file (packaged as
    "Special Processing"). This system takes an audit file and does stuff with
    it (in a use case called "Process Audit File"). The benefitting actor is an
    external element, called "system_2". "Special Processing" relies on the
    audit file created from the "Audit System".

    I use a collaboration in my use cases and realize the collaboration of one
    system to my other system. The reason for using a collaboration is that the
    "Audit System" is a separate system from my "Special Processing" system.
    The question is which system do I show the collaboration in?

    My intuition tells me to have the collaboration in the "Special Processing"
    system. The "Audit System" is a collaboration within "Special Processing",
    and realizes my use case "Process Audit File" (which is in "Special
    Processing"). A realization defined is "A semantic relationship between
    classifiers, in which one classifier specifies a contract that another
    classifier guarantees to carry out". So, the contract would be that the
    "Audit File System" collaboration has a contract to produce an audit file,
    that the "Process Audit File" use case needs to use. This makes sense.

    However, what's stopping me from putting a collaboration in "Audit System"
    for "Special Processing". The theory here is that the current system "Audit
    System"'s use case "Produce Audit File" would be realized by the
    collaboration of "Special Processing". The contract would be that the
    "Special Processing" system has a contract that requires an audit file.

    Does this make sense? What do you think I should do in this instance? Is
    this the proper way to approach this problem? Are there any better ways of
    modelling a relationship like this?

    Thanks for your help!

    Cheers,
    Jason

    P.S. Do you have any suggestions for good UML reference material (online or
    in hardcopy)?


    "Guy Smith" <sadf@sdf.com> wrote in message news:3cf55c59$1@10.1.10.29...
    >
    > If I understand, you will present the user with some preset denomination

    values
    > to select and, if they don't want any of the presets, they need to type in
    > a different value?
    >
    > Your getting too detailed. Your use case shouldn't follow the flow of the
    > user interface. Put the need to select a denomination as one of the steps
    > in the text description of the "withdraw" use case i.e. "User enters the
    > denomination to withdraw". Notice that this doesn't say "how", just that
    > they need to. Providing default values to choose, etc. are specifics of
    > "how" the user enters the denomination. The ability to give preset values
    > would be documented somewhere down the line probably in a user interface
    > diagram some where.
    >
    > Wouldn't it make more sense to select an account prior to selecting the

    action
    > to do on it? Then the user could withdraw, deposit and get balance
    > on the account multiple times. But I guess this is just an example so it
    > doesn't matter.
    >
    > If this example missed the point of what you are asking let me know and

    I'll
    > see if I can help.
    >
    > Guy Smith
    >
    >
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center