SOEN 6481 Software Systems Requirements Specification Summer 2014 Deliverable #2 TICKET VENDING MACHINE (“Domain Model & Use Case Model”) (A) Instructor: Dr. Pankaj Kamthan Presented by: NAME Arash Abolfathi Chetan Dalal Parham Darbandi-Tehrani Navdeep Kaur SOEN 6481 DELIVERABLE 1 TEAM A Contents 1. Introduction .............................................................................................................................................. 3 2. Domain Model .......................................................................................................................................... 3 2.1 Domain Model Diagram ...................................................................................................................... 3 2.2 Domain Model Description ................................................................................................................. 4 2.3 Relationships ....................................................................................................................................... 5 3. Use Case Model......................................................................................................................................... 7 3.1 Use Case Model................................................................................................................................... 7 3.2 Unified Modeling Language (Uml) ...................................................................................................... 7 3.3 Use Case Diagram ............................................................................................................................... 7 3.4 Description Of Each Use Case ............................................................................................................. 9 3.4.1 Select Ticket Type ........................................................................................................................ 9 3.4.2 Pay Fare ...................................................................................................................................... 10 3.4.3 Cancel Transaction ..................................................................................................................... 11 3.4.4 Print Ticket ................................................................................................................................. 12 3.4.5 Print Receipt............................................................................................................................... 13 3.4.6 Select Subsidized fare ................................................................................................................ 14 3.4.7 Maintain Fare Information......................................................................................................... 15 3.4.8 View daily report ........................................................................................................................ 16 3.4.9 View Weekly/Monthly report .................................................................................................... 17 3.4.10 Refund Fare .............................................................................................................................. 18 3.4.11 Steal Financial Information ...................................................................................................... 19 3.4.12 Access Help .............................................................................................................................. 20 3.5 Sequence Diagram ............................................................................................................................ 21 4. References .............................................................................................................................................. 25 5. Contribution Details ................................................................................................................................ 26 2 SOEN 6481 DELIVERABLE 1 TEAM A 1. Introduction Domian modelling is a type of static structure diagram that refer to the structure of a system by presenting the system's classes, their attributes, operations (or methods), and the relationships among objects. A use case is a list of steps, typically defining interactions between a role(Also Known as "actor") and a system, to achieve a goal. The actor can be a human or an external system. [Wikipedia].Use case is a depection of behavioural structure which does not deals with the system internal design but mainly focus on the possible interaction with the entire system environment. 2. Domain Model 2.1 Domain Model Diagram The following domain model shows the concepts and relationship between them for a TVM (Ticket Vending Machine). 3 SOEN 6481 DELIVERABLE 1 TEAM A 2.2 Domain Model Description There are different concept classes in our domain model. They are described in the table below: Concept Description (Class Name) Transaction Represents the process of buying ticket by passenger. The ticket type will be selected and be paid by the passenger. Then the ticket will be prvided for the passenger which can be in the form of a printed tiecket or a prepaid card. Ticket Represents different type of tickets like one way ticket,two way ticket and monthly. It will be provided as a prepaid card or as a printed ticket. Payment Represents different method of payment for transaction which can be Cash, Debit or credit card. Debit Represent use of Debit card to pay ticket price and it uses bank service as an external system. Credit Card Represent use of a Credit card to pay ticket price and it uses bank service as an external system. Cash Represent use of cash to pay ticket price directly without any interaction with an external system like a Bank. Card Represents the card which it uses to store the ticket when a prepaid card option is selected instead of a printed ticket. The card has a pin number which is unique and tracable during trasportaion. Printer Represent print for issuing the ticket and receipt. Ticket Printer Represent printed ticket in case of selecting the printed ticket instead of a prepaid card. Receipt Printer Represent the receipt which includes Amount of payment, Ticket Type and Card pin in case of a prepaid card. 4 SOEN 6481 DELIVERABLE 1 TEAM A 2.3 Relationships The relationships between classes are very important[1][2]. Multiplicity describes how many instances of one class can be associated with one instance of the related class. Here are some examples of multiplicity symbols. 1= exactly one; 0...1= Zero or one; 0...* = Zero or more; 1...* = One or more; *= Many. Below table describes association and relationship between different concept classes. Relationship Source Concept Target Concept Description Transaction Payment A Transaction has exactly one payment to buy the ticket. Payment Transaction A payment has exactly one transaction. Payment Credit Card A Credit Card is a subclass of payment and it add behaviors to payment class to pay by credit card . Payment Debit Card A Debit Card is a subclass of payment and it add behaviors to payment class to pay by Debit card Payment Cash A Cash is a subclass of payment and it add behaviors to payment class to pay by Cash. Transaction Printer A Transaction has one or two printer, one printer to print receipt and one printer to print paper ticket in case of selecting the printed ticket instead of a prepaid card. 5 SOEN 6481 DELIVERABLE 1 TEAM A Printer Receipt Printer A Receipt Printer is subclass of printer and it adds behavior to printer to print receipt of transaction Printer Ticket A Ticket Printer is subclass of printer and it adds behavior to printer to print ticket. Printer Transaction Card A Transaction has zero or one card to charge,in fact when passanger select paper ticket there is no card to charge. Card Transaction A Card has exactly one transaction. 6 SOEN 6481 DELIVERABLE 1 TEAM A 3. Use Case Model 3.1 Use Case Model Use case model for a software system is the set of all actors , all use cases, and the relationships among them. A use case model provides view of a system that focuses on the behavior as it is external to users. It does not address the internal structure of the system[3]. 3.2 Unified Modeling Language (Uml) Unified modeling language is a general purpose modeling language which is generic, semi-formal, having medium to high level learning curve and moderately expressive to provide a standard way to visualize the structure and design of system. It is used for graphical representation of use case model. 3.3 Use Case Diagram Use case diagram can be used to provide high level structural representation of use cases, actors and interaction between them. Diagram that describes a set of sequence of actors and use cases such that each sequence shows the relevant relationship between them[4]. In use case diagram there exist a interaction between system and the actor. There are three major types of relationship that exists in use case diagram: 1. Association 2. Dependency 3. Generalization An Actor represents a system user or external entity[9]. It is a role played by an entity external to the system, when it uses the system. Actor is something or someone who: 1. Is external to the system. 2. Provides input to and receives output from system. 3. Interact with the system. Actors are of two types: 1. Primary actors- actor that initiates a use case. 2. Secondary Actors- actor that supports the primary actor to achieve the goals of use case. 7 SOEN 6481 DELIVERABLE 1 TEAM A In TVM, user is a primary actor. Bank, employee, manager and hacker are the secondary actors of the system. Use case is a specific way of using a system or actions performed by a system that provides valuable result to an actor[7][9]. Use case can be: 1. Delivering something of value to system 2. Pattern of behavior that a system exhibits 3. Sequence of transaction performed by system 8 SOEN 6481 DELIVERABLE 1 TEAM A 3.4 Description Of Each Use Case "There is no standard way to write the content of a use case, and different formats work well in different cases." Says Martin fowler Description of use cases can be done in number of ways. Tables are organized structures to provide all mandatory information and details regarding each use case. These details can ID, name, Scope, priority, pre-conditions, post-conditions, trigger, normal flow, alternate flow, exceptions, business rules, assumptions etc. regarding use cases. Following templates shows the list of all the use cases used in TVM and their details[8]: 3.4.1 Select Ticket Type ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Alternate Flow: Exceptions: Assumptions: UC-1 Select Ticket Type User None The user selects the ticket he/she wants. There are many types of tickets available such as one way ticket, two way ticket, weekend pass, monthly or weekly etc. User clicks on select ticket type button or inserts a metro card. PRE-1. User knows how to operate machine. PRE-2. User should have knowledge about different types of tickets available. PRE-3 TVM should be working properly. POST-1. List of type of tickets is displayed. 1.0 Select the type of ticket that user wants 1. User clicks the select ticket type button on the TVM. 2. TVM displays the available list of tickets. 3. User selects the ticket he needs. 1.1 Recharge through metro OPUS card 1. User inserts the metro card. 2. User clicks the select ticket type button. 3. TVM displays the available list of tickets 4. User selects the ticket he needs. 1.2 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. TVM is working correctly in all conditions. 9 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.2 Pay Fare ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Alternate Flow: Exceptions: Assumptions: UC-2 Pay Fare User Bank The user pays fare for the ticket he/she wants. There are many types of tickets available such as one way ticket, two way ticket, weekend pass, monthly or weekly etc. having different fares. User clicks on Pay Fare type button or inserts a metro card. PRE-1. User knows how to operate machine PRE-2. User should have knowledge about different types of tickets available PRE-3 TVM should be working properly. POST-1. Method of payment displayed POST-2. List of fares corresponding to each tickets is displayed. POST-3. Authentication check and Payment accepted. 2.0 User Pays fare for the ticket 1.User inserts the payment card(credit or debit) and password . 2. TVM perform authentication check for user details 3. TVM displays charge reminder and confirmation message 4. TVM processes payment and prints ticket. 5. Any change (Left over balance) if money was inserted is returned to the customer. 5. User takes card, ticket and receipt. 2.1 user uses cash for payment 1. User inserts cash in bin. 2. TVM processes payment and prints ticket. 4. User takes ticket and receipt. 2.2 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. TVM is working correctly in all conditions. 10 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.3 Cancel Transaction ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-3 Cancel transaction User Bank The user wants to cancel the transaction. It may happen as user might have chosen wrong ticket, or any other reason. User clicks on cancel transaction button. PRE-1. User knows how to operate machine PRE-2. User should have knowledge about different types of tickets available PRE-3 TVM should be working properly. POST-1. Authentication check POST-2. Transaction rollback POST-3 Return money to user 3.0 User wants to cancel the transaction 1. User clicks the cancel transaction button. 2. TVM rolls transaction back and ask user to insert payment card. 3 .User inserts the payment card(credit or debit) and password 4. TVM credits the money back in user’s account or returns the cash. 3.1 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. TVM is working correctly in all conditions. 11 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.4 Print Ticket ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-4 Print Ticket User None The ticket needs to be printed after payment by user is done and after all confirmations Authentication check successful PRE-1. User knows how to operate machine PRE-2. User should have knowledge about different types of tickets available PRE-3 TVM should be working properly. POST-1. Authentication check POST-2. Print ticket 4.0 TVM prints the ticket 1. TVM confirms authentication of user and checks details. 2. TVM prints the ticket 4.1 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. TVM is working correctly in all conditions. 12 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.5 Print Receipt ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-5 Print Receipt User None The receipt needs to be printed after payment by user is done and after all confirmations Authentication check successful PRE-1. User knows how to operate machine PRE-2. User should have knowledge about different types of tickets available PRE-3 TVM should be working properly. POST-1. Print receipt 5.0 TVM prints the receipt 1. TVM confirms authentication of user and checks details. 2.TVM prints the ticket and receipt. 5.1 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. TVM is working correctly in all conditions. 13 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.6 Select Subsidized fare ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-6 Select Subsidized fare User None The use case provides with the information for a special subsidized fare imposed by regulators/legislation or simply discounted fares. User Metro card authentication PRE-1. User knows how to operate machine PRE-2. Metro card is presented to the machine in a proper slot. PRE-3 User selects a particular ticket type to recharge metro card. POST-1. Discounted ticket is generated successfully. 6.0 TVM prints the ticket/recharge metro card 1. TVM confirms authentication of user and checks details. 2. User selects the Ticket from available type of tickets. 3. TVM processes the transaction and prints ticket 6.1 There is a troubleshoot 1. TVM is not working 2. User clicks the wrong button. 6.2 Transaction Rollback for wrong ticket type. 1. User selects a wrong discounted ticket but payment is not made, let user to go back to previous screen. 1. TVM is working correctly in all conditions. 2. TVM fare information is updated on regular basis.(e.g. Weekend tickets can only be purchased on weekends only) 14 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.7 Maintain Fare Information ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-7 Maintain fare information Employee None The employee of the software company or the public transport technical staff member is responsible to update the fares on time and as per the guidelines of the operating organization. Maintenance schedule/software update PRE-1. Machine is connected to transport system network. PRE-2. TVM is not updated during business hours. POST-1. Fare information is successfully updated on the machine. POST-2. User is able to purchase tickets after update. 7.0 TVM fare information is updated 1. TVM goes to maintenance mode during update. 2. Machine then performs a diagnostic check to verify the update. 3. TVM machine restarts with new fare information. 7.1 There is a troubleshoot 1. TVM is not working. 2. Network problems does not let update to complete. 1. TVM is working correctly in all conditions. 2. TVM update and maintenance is performed in regular release fashion. 15 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.8 View daily report ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-8 View daily report Employee None Each TVM must have a record of the ticket sold per day or metro card recharges performed. The information s need for the financial and statistical purposes. Employee selects particular machine on the system to get reports. PRE-1. Machine is connected to transport system network. PRE-2. TVM keeps all the records stored locally as well as remote location. POST-1. Daily reports are generated at the employee end. 8.0 TVM daily report 1. Employee select the machine on the network. 2. Machine then sends latest data from the central hub or local storage based on time of request.(Only the latest will be sent) 3. Employee gets all the daily reports. 8.1 There is a troubleshoot 1. TVM is not working. 2. Network problems exist between central database and machine. 1. TVM is working correctly in all conditions. 16 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.9 View Weekly/Monthly report ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-9 View Weekly/Monthly report Manager None Each TVM must have a record of the ticket sold per day/month or metro card recharges performed. The information s need for the financial and statistical purposes. Manager selects particular machine on the system to get reports. PRE-1. Machine is connected to transport system network. PRE-2. TVM keeps all the records stored locally as well as remote location. POST-1. Monthly reports are generated at the Managers end. 9.0 TVM daily report 1. Manager select any number of machine on the network. 2. All machines then send latest data from the central hub or local storage based on time of request.(Only the latest will be sent) 3. Manager gets all the reports. 9.1 There is a troubleshoot 1. TVM is not working. 2. Network problems exist between central database and machine. 1. TVM is working correctly in all conditions. 17 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.10 Refund Fare ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-10Refund Fare Bank Customer User gets the money back if the ticket operation is interrupted due to any reason. Machine goes to failure state. PRE-1. Machine is connected to transport system network and a banking system. POST-1. Customer gets the money back only in case of cancelled transaction or failure to generate ticket. 10.0 TVM refunds the money 1. User selects the tickets and inserts money/Card. 2. Machine sends authorization request to banking system. 3. Ticket cannot be generated due to any problem inside machine. 4. Machine requests the refund to banking system or returns the money back to customer. 10.1 TVM is unable to contact the Banking system 1. TVM is not working. 2. Network problems exist between bank and machine. 1. TVM is able to identify the correct amount every time. 18 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.11 Steal Financial Information ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-11 Steal financial Information Hacker None Hackers, Misusers can attack the transport system network to get customer credit card information. None PRE-1. Machine is connected to transport system network and a banking system. POST-1. Hacker is not able to get any information related to credit cards for misuse. 11. TVM identifies a hacking attack. 1. Machine is in a normal working state. 2. Machine authenticates every request for information over the network. 3. Banking information is immediately deleted from local machine after transaction is complete. None 1. TVM is able to identify the service request and denies access to any information. 19 SOEN 6481 DELIVERABLE 1 TEAM A 3.4.12 Access Help ID and Name: Primary Actor: Secondary Actor: Description : Trigger: Preconditions: Post conditions: Normal Flow: Exceptions: Assumptions: UC-12 Access Help Customer None The user is unable to understand any option on the screen because of a newly implemented unfamiliar interface or is incapable due to any other biological factor(Except blindness, age) None PRE-1. Access help option is displayed on every screen. POST-1. Additional information and steps are displayed to the customer. 12. User is able to access help information 1. User come to machine and selects the access help on the main screen to understand how to get ticket. 2. User press back button to go back to the previous screen and start transaction. None 1. Access help is available is available both at start and on every screen when performing the ticket transaction. 20 SOEN 6481 DELIVERABLE 1 TEAM A 3.5 Sequence Diagram A sequence diagram is diagram that shows how object interactions are arranged in time sequence with one another and in what order. It provides the objects and classes involved in the scenario and messages exchanged between the objects required to perform functionality of the scenario. Sequence diagrams are sometimes known as event diagrams, event scenarios[5][6]. Scenario describes a use case in real world in detail. Scenario consists of a sequence of actions. Scenario takes input values from a primary actor then performs actions that leads to changes to the internal state of system which provides output for each action. Following are the Sequence diagrams for mandatory use cases expressing normal scenario for them. A) Sequence diagram for “Pay Fare” use case – This sequence diagram provides the model of flow of control when user operates the TVM for selecting the type of ticket. 21 SOEN 6481 DELIVERABLE 1 TEAM A B) Sequence diagram for “ Pay Fare” use case- This sequence diagram provides the model of flow of control when user clicks Pay fare button. C) Sequence diagram for “ Print Ticket” use case- This sequence diagram provides the model of flow of control when TVM prints the ticket. 22 SOEN 6481 DELIVERABLE 1 TEAM A D) Sequence diagram for “View Reports” use case- This sequence diagram provides the model of flow of control when manager views the monthly rental report or employee views daily rental report. E) Sequence diagram for “Steal Information” use case- This sequence diagram provides the model of flow of control when hacker steals the private information of users such credit card number and pin, debit card details etc. 23 SOEN 6481 DELIVERABLE 1 TEAM A 24 SOEN 6481 DELIVERABLE 1 TEAM A 4. References [1]. [2]. [3]. [4]. [5]. [6]. [7]. [8]. [9]. P. KAMTHAN, “INTRODUCTION TO DOMAIN MODELING”, class notes for SOEN 6481, Department of Computer Science and Software Engineering, Concordia University, Summer, 2014. P. KAMTHAN, “IMPLICATIONS OF SOFTWARE ENGINEERING PRINCIPLES FOR DOMAIN MODELING”, class notes for SOEN 6481, Department of Computer Science and Software Engineering, Concordia University, Summer, 2014. P. KAMTHAN, “INTRODUCTION TO USE CASE MODELING”, class notes for SOEN 6481, Department of Computer Science and Software Engineering, Concordia University, Summer, 2014. “Use Case“, [online].available: "http://en.wikipedia.org/wiki/Use_case”, [Accessed: June. 07, 2014] “Sequence diagram“, [online].available: "http://en.wikipedia.org/wiki/Sequence_diagram”, [Accessed: June. 07, 2014] “UML basics: The sequence diagram“, [online].available: "http://www.ibm.com/developerworks/rational/library/3101.html”, [Accessed: June. 07, 2014] “Examples of Use Case Modeling Antipatterns“, [online].available: "http://faculty.kfupm.edu.sa/ICS/melattar/UCAntipatterns.htm”, [Accessed: June. 07, 2014] K. Wiegers, J. Beatty., Software Requirements, Microsoft Press. , 3th edition, 2013. I.Jacobson, G. Booch, J. Rumbaugh.,The Unified Software Development Process., AddisonWesley. 1999. 25 SOEN 6481 DELIVERABLE 1 TEAM A 5. Contribution Details Name Of Team Member Arash Abolfathi Chetan Dalal Parham Darbandi-Tehrani Navdeep Kaur Details Of Contribution 1. Domain Modelling 2. UML review 3. Report formatting 1. Create and update Wiki page. 2. Use case modelling and template 3. Use Scenario diagrams 1. Domain Modelling 2. UML review 3. Report formatting 1. UML domain/Use case analysis. 2. Use case modelling and template 3. Use Scenario diagrams 26
© Copyright 2024 Paperzz