Objectives: 1. To practice generating a use case model, a domain model and sequence diagrams for a given business scenario.
General Instructions: 1. You can choose to create your diagrams using a tool (Visio, Visual Paradigm, Astah Community, PowerPoint, etc), but having your answers on a handwritten sheet of paper is sufficient for this exercise.
Question 1: HealthFirst hospital 1. HealthFirst hospital requires a patient management system (PMSystem) with the following requirements:
Nurses shall use the system to record new patients and their history of visits. Nurses could also use the system to enter the doctor(s) being assigned to a patient for a visit. A doctor can prescribe a medication to the patients and the system should also record this. Nurses would help the doctor to enter the prescription into the system; i.e. doctor does not use the system. Every line in the prescription corresponds to a medicine and its dosage. Hospital billing staffs would also use the system to create a bill for patients. Each bill would only contain a single item, i.e., the consultation fee. Purchase of medication is not managed by the system. The system would make use of a third-party credit card processing system developed by BillingCorp Pte. Ltd. Both the nurses and the billing staffs would need to log in to the system before they could use it. |
2. You are the Business Analyst. Here is your job: a. Identify the use cases for the requirements above & draw the Use Case diagram.
b. Identify the domain classes and the possible relationships between these classes & draw the Domain Model
c. Select one of the more complex use cases from your use case model and draw the System Sequence Diagram
d. For the operation identified in the previous step, produce an operation contract.
e. Draw the Sequence Diagram for the SSD and operation contract identified in the previous steps.
Question 2: Bank Prototype 1. This following is a transcript of the first meeting of a series of meetings planned to elicit software requirements between a business analyst and a sponsor:
Business Analyst | Can you tell me in summary what your application does? | Sponsor | I want to create a bank prototype which allows our clients to perform simple functions. Users run a Java application on their desktops which talks to a backend database server. | BA | What are the different types of users for this client program? | S | There are 3 groups of users: authenticated users – these are our banking clients who have been given a user ID and password. Unauthenticated users, who are allowed to view some information such as information about the bank. And lastly administrators who are bank staff. | BA | Can you tell me what unauthenticated users can do using this program? | S | Unauthenticated users can view static information such as information about the bank, the history, founders etc. That’s all they can do. They can’t even register for an account using this program. They will need to visit a branch to do that with a teller. | BA | What about authenticated users? | S | All our bank’s clients will be given a user ID and password which they can use to log in to this client application. Of course, the list of user IDs and passwords will be stored in a database. After logging in successfully, they will be shown a menu. | BA | What’s on this menu? | S | They can do 2 things with this menu: (1)transfer funds and (2) make payment to a payment gateway | BA | Tell me more. | S | For funds transfer, users need to input 2 things: the transferee’s user ID and the amount to transfer in dollars & cents. A check is done to ensure that the transferee’s user ID is valid, and that the transferor’s balance is more than or equal to the amount to transfer. The transfer is then performed by debiting the transferor’s balance and crediting the transferee’s balance. The program logs the funds transfer, regardless of whether it is successful.For the make payment function: we have a partner which provides payment gateway services via Web services. They provide a local Java class which contains a method called makePayment which takes in the user ID, the amount to pay and a reference ID which uniquely identifies the merchant to be paid as well as the transaction for which payment is made for. This local class then performs the necessary actions to contact the payment gateway through the Internet securely. How it works is totally abstracted from us – all we have to do is to make that method call. Of course, these fields (reference ID, amount to pay) need to be keyed in by the user. The amount to pay needs to be less than or equal to the user’s balance. Under no circumstances should the user’s balance fall below zero – that’s our business rule. As for funds transfer, the program logs a payment transaction regardless of whether it is successful. All these logs will be written to a database table. | BA | What about the functions available to an administrator? | S | An administrator can do 2 things: (1) View transaction logs (of funds transfers and payments) and (2) View account balance summary of all users. We are thinking of adding new functionalities down the road, but for now, that’s it. | BA | Users and administrators need to log in. I assume there is a log out function as well? | S | Yes. After logging out, users and administrators need to log in again before they can perform their functions. | BA | What about the “basic” user management functions? Such as password changes? | S | Oh. Thanks for reminding me! Yes – each authenticated user and administrator should have a change password function. The password change is immediate. There is no password recovery function; if the password has been forgotten, users must visit a branch teller to get a new one. | BA | Cool. Anything else to add? | S | Nope. I hope you have recorded the functional requirements. As of now, the prototype which you need to show me does not need to focus on the non-functional requirements such as speed or reliability. Just focus on the functions. | BA | Yes. Thank you. I will create the use cases for inclusion in the Software Requirements Specification. | S | Happy New Year and good luck! | BA | Same to you as well! |
2. You are the Business Analyst. Here is your job: a. Identify the use cases for the requirements above & draw the Use Case Model.
b. Identify the domain classes and the possible relationships between these classes & draw the Domain Model
c. Select one of the more complex use cases from your use case model and draw the System Sequence Diagram
d. Draw the Sequence Diagram for the SSD identified in the previous step.
END