Question

In: Computer Science

Due Friday Oct. 30th, 11:59pm (10 marks total): 1. Explain the purpose of a sequence diagram....

Due Friday Oct. 30th, 11:59pm (10 marks total):

1. Explain the purpose of a sequence diagram. .

2. Draw a sequence diagram for the online ticketing system in Assignment #3. Identify the objects, lifelines, messages, and focuses in your diagram. .

Solutions

Expert Solution

ANSWER1).UML Sequence Diagrams are interaction diagrams that detail how operations are carried out. They capture the interaction between objects in the context of a collaboration. Sequence Diagrams are time focus and they show the order of the interaction visually by using the vertical axis of the diagram to represent time what messages are sent and when.

Sequence Diagrams captures:

  • the interaction that takes place in a collaboration that either realizes a use case or an operation (instance diagrams or generic diagrams)
  • high-level interactions between user of the system and the system, between the system and other systems, or between subsystems (sometimes known as system sequence diagrams)

Purpose of Sequence Diagram

  • Model high-level interaction between active objects in a system
  • Model the interaction between object instances within a collaboration that realizes a use case
  • Model the interaction between objects within a collaboration that realizes an operation
  • Either model generic interactions (showing all possible paths through the interaction) or specific instances of a interaction (showing just one path through the interaction)

ANSWER 2).SEQUENCE DIAGRAM FOR ONLINE TICKETING SYSTEM

EXAMPLE 1:

EXAMPLE 2:

Objects:

Objects that are involved in the sequence of events you are documenting should be placed at the top of the sequence diagram across its horizontal axis. As shown in above figures it's a good idea to place the actor that initiates a particular sequence at the upper left side of the diagram. You can also place a "UI" (user interface) placeholder class on the diagram with which the actor interacts. This is an excellent tool for providing context for a use case.

Next, you can place objects on the diagram that are instantiated by the UI or by other objects. You should place the most important objects to the left and subordinate objects to the right. It's best to place objects on the diagram in a way that minimizes lines that cross.

In figure 1: objects are Passenger,Flight,Available flight,passenger information,Meal and set,Reservation and Payment

In figure 2: Objects are Admin,Registered user,visitor,movies,book ticket and payment.

Lifelines

The lifeline is the dotted line that extends down the vertical axis from the base of each object. The lifeline indicates the life span of an object over a period of time.

Messages

Messages are the most important elements of a sequence diagram. They indicate when one object calls an operation on another object (or itself). They are also used to indicate return values. Message flow begins at the top left object (which is usually an actor) and flows down the vertical axis from one object to another.

In figure 1:Message are search(),select,select(),fillup(),choose() and so on.

In figure 2: Messages are AddMoviesRecords(),UpdateMovieRecord(),DeletMoviesRecord(),ShowMovies() and so on.

Focus of Control

Focus of control (FOC) is used in sequence diagrams to show the period of time during which an object performs an action. FOC is rendered as a thin, rectangular object that sits on top of object lifelines. The top of the FOC rectangle coincides with the receipt of a message. The bottom of the rectangle coincides with the completion of an action and can be marked with a return message.


Related Solutions

Please give C++ code ASAP Matrix Multiplication Due Friday 30th October 2020 by 23:55. (2 marks)...
Please give C++ code ASAP Matrix Multiplication Due Friday 30th October 2020 by 23:55. For this exercise, you are to find the optimal order for multiplying a sequence of matrices. Note: you do not actually have to perform any matrix multiplications. As usual, your program will prompt for the name of an input file and the read and process the data contained in this file. The file contains the following data. N, the number of matrices to be multiplied together...
Please give Java Code ASAP Matrix Multiplication Due Friday 30th October 2020 by 23:55. (2 marks)...
Please give Java Code ASAP Matrix Multiplication Due Friday 30th October 2020 by 23:55. For this exercise, you are to find the optimal order for multiplying a sequence of matrices. Note: you do not actually have to perform any matrix multiplications. As usual, your program will prompt for the name of an input file and the read and process the data contained in this file. The file contains the following data. N, the number of matrices to be multiplied together...
CS2123 Data Structures - Fall 2019 Assignment 1: Function Runtimes Table Due 9/11/19 by 11:59pm Completing...
CS2123 Data Structures - Fall 2019 Assignment 1: Function Runtimes Table Due 9/11/19 by 11:59pm Completing the Program (15 points) This program prints a table of runtimes (these are displayed in seconds) for given functions on arrays. The program tests different array sizes to establish a relationship between input size and runtime. It tests each array size multiple times and then takes an average of the times. Here are example calls to the timing functions: int sizes[] = { 1000,...
1. Explain the purpose for protecting geographical location as a form of IP protection. (10 marks)...
1. Explain the purpose for protecting geographical location as a form of IP protection. *Note- Please make it lengthy for 10 marks*. ThankYou
Question 1 (10 marks) Describe the purpose of each Financial Statements and explain the relationships among...
Question 1 Describe the purpose of each Financial Statements and explain the relationships among them?
11. Write an application case study with network design diagram including the following topics: [10 Marks]...
11. Write an application case study with network design diagram including the following topics: [10 Marks] - IoT - Bluetooth - Fog Computing - Redundant - Resilient and measures of resilience - Troubleshooting with half split and move method Highlight in bold each of the above keywords.
1) Total marks: 10 marks Mr Howe a junior partner of CPA fir, Dewey, CHeatem and...
1) Total marks: 10 marks Mr Howe a junior partner of CPA fir, Dewey, CHeatem and Howe (DCH) is very excited about the opprtunities created by fair value relvaluation of non current assets. hr believes that there is an enormous opportunities for large firms to increase their book profits via the gains from such revaluations. Required: Mr Tu Dewie has asked you to review the AASB rules on the fair market revaluation of non current assets and to assess what...
Question 1: Descriptive Statistics: Each question is worth 2 marks: Total (10 marks) Data: 22 24...
Question 1: Descriptive Statistics: Each question is worth 2 marks: Total Data: 22 24 26 26 28 30 32 38 44 A. What is the mean? B. What is the median? C. What is the mode? D. What is the 25th and 75th percentile? E. What is the interquartile range?
TQM 10 marks Explain what your total quality management approach would be as an organization. What...
TQM 10 marks Explain what your total quality management approach would be as an organization. What steps would you implement and how would you make sure TQM was being followed by all members of the company?
Question 1: An overview of management accounting (20 marks in total) 1a. Describe and explain the...
Question 1: An overview of management accounting (20 marks in total) 1a. Describe and explain the differences between management accounting and financial accounting. 1b. Describe and explain the major functions of management accounting and give examples. 1c. Using your textbook and other relevant references, explain how concepts such as panopticism, control, and discipline may be relevant to management accounting, give examples.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT