0

For this question we got for a mock test we did and I have put the correct options in bold

Consider the following use case diagram, is it correct to state that:

enter image description here

a. Customer directly interacts with Bank via Valid customer.

b. Only valid customers can undertake withdrawal, deposit, and transfer transactions.

c. It is possible to attempt to transfer an amount from an account greater than the funds in the account.

d. A check for sufficient funds is undertaken prior to a customer withdrawing funds.

e. Customers can withdraw from one of three types of accounts.

Here is my confusion:

Firstly, for option a why is it not correct because Valid Customer is an included use case, so if Valid customer is executed, then the parent use case will obviously be executed, thus, withdraw cash, deposit or transfer cash will be executed and Customer and Bank directly interact via these three use cases right?

Secondly could someone please explain how this use case diagram is working? For example, if you Transfer cash you must check if customer is a valid customer but then do you have to execute deposit and withdraw cash as valid customer is an included use case for those as well. Can valid customer and check funds sufficient be executed on its own?

2
  • Just to clarify how the diagram is working: So, a Use Case diagram is not representing actual software components (e.g. it can be constructed early on, before any code is written), it's just meant to be a high-level picture of various things users/actors expect they'll be able to do. So, each blob that has a line coming from an actor is basically an independent operation. Now the "include" arrow points towards the thing that's included; Withdraw, Deposit and Transfer all share a common step (Validation), but can be executed independently. Here, you can't execute Valid cust. directly. 1/2 Commented May 21, 2022 at 13:12
  • If Valid customer is executed as, say, a part of Transfer, it will not also execute Deposit and Withdraw. But Deposit and Withdraw can each independently invoke Valid customer. Kind of like one function can be called by three other functions, but calling one of those will not call all the others. Note, however, that a use case is not a function - it's a thing the system can do that's of some value to the actor; it consists of a number of steps that may require a coordinated effort of many functions to be executed. 2/2 Commented May 21, 2022 at 13:12

2 Answers 2

1

Firstly, for option a why is it not correct because Valid Customer is an included use case, so if Valid customer is executed, then the parent use case will obviously be executed, thus, withdraw cash, deposit or transfer cash will be executed and Customer and Bank directly interact via these three use cases right?

The "valid customer" use case is included by the "withdraw cash", "deposit", and "transfer cash" use cases. However, it doesn't say where the behavior is included. Conceivably, there are steps to take in which case a person who does not pass those checks would begin the process of withdrawing cash. For example, if the steps are to insert a debit card and then enter the PIN, a person may have a valid debit card but not have created a PIN or may not know the PIN to enter a valid PIN. An "invalid customer" may begin the use case and be rejected. It's probably safe to say that a "valid customer" may be the only one to complete the use case, "invalid customers" may start them.

Secondly could someone please explain how this use case diagram is working? For example, if you Transfer cash you must check if customer is a valid customer but then do you have to execute deposit and withdraw cash as valid customer is an included use case for those as well. Can valid customer and check funds sufficient be executed on its own?

Use case diagrams don't show how a system works. They only show the key actions that an actor make take using the system. In this case, the only actions are "withdraw cash" (with three specific types - "withdraw current", "withdraw deposit", and "withdraw foreign"), "deposit", and "transfer cash". Because these are the actions associated directly with actors, these are the only functions available.

On its own "valid customer" doesn't make much sense as a use case. I don't think that anyone would use an ATM to see if they are a valid customer. However, checking funds could be a reason why someone would use an ATM. However, since it's only an extension to the "withdraw cash" use case, it doesn't appear that anyone can carry out those steps separate from withdrawing cash. If they could, I would expect a line between an actor and the use case.

1

The customer interacts with the ATM system, which in turn interacts with the bank. The customer doesn’t even see what is going on there. So, she is not interacting with the bank.

b and c can not really be answered with the information given. We might assume that validate customer must be successful, but we can only know this, if we have a description of the complete use case. transfer cash is not extended by check funds sufficient, but that doesn’t exclude that in its description such a check is done. It is possible, that your instructor gave you a set of project specific modeling conventions, that lets you draw these conclusions, but from the diagram alone, you cannot draw them.

The «include» arrow points from the including use case to the included use case. That makes validate customer part of the three other use cases. It doesn‘t make the three use cases a part of validate customer.

Please note that use cases are not „executed“. They describe a goal of using the system and are the starting point for analyzing how it is used. Using the system means executing functions of the system. Use cases simply occur.

An included use case is still a use case. So, the system can also be used in this way. validate customer however, doesn‘t make sense on its own. Technically, it is not a use case. Some authors suggest to mark it as a „secondary“ use case. Its only purpose is to make the use case model less redundant.

An extending use case is not complete without the use case it extends. Therefore, it cannot occur on its own.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.