roaa assignment
Spring-2 2020
CNS280
System Analysis and Design
Tap 3 Sequence diagram
Date:
|
Student Name |
Student ID |
|
|
|
|
Feedback/Comments: |
|
|
|
Total Grade 100 |
To get points, YOU MUST SHOW YOUR CALCULATIONS!
Print this paper, write your answer by hand, and submit scan copy of your paper. If you do not have printer/scanner, write answer on paper, then take photo, and place in the answer, like shown below:
Example Question and answer:
Question: Name any standard organization Abbreviation and its full name:
Task 1. (15 pts)
Given a user story (story that is written from user perspective), create sequence diagram.
1. Open an item page.
2. Select attributes (e.g. color of the item, size of the item)
3. if [out of stock]
3.1 SYSTEM Display “Out of Stock” message
4. else
4.1 SYSTEM Show quantity box
End if
5. Enter quantity.
6. Click “Add to cart”
7. SYSTEM Prompt “Do you want to continue shopping?”
8. if [has chosen “Yes”]
8.1 jump to 1. Open an item Page
End if
Hints:
You should have 2 objects:
1. User
2. SYSTEM
How many frames/fragments did you use in your diagram? _____________
What kind of fragments exist in a sequence diagram, name them? ___________
Task2 (15 pts)
For a given method public void register(String name, int age) draw the sequence Diagram on a piece of paper.
What is the name of a message type that creates another object? ______________________
Hints:
You will have 3 objects:
1. RegisterController object
2. account: Account object (will be created by message from register object)
3. _accounts: List object
You should have 5 messages in your sequence diagram.
Task 3 (20 pts)
For a given scenario draw the sequence Diagram on a piece of paper and post a picture of it.
Consider the next case: A passenger (Fatima) requests a flight from AlFalcon Agency. A Sales Representative Hajra from AlFalcon checks the availability from Kuwait Airline system. After getting available flights and AlFalcon sends flight details to the passenger. Passenger requests seat preference, AlFalcon books it in the system. Passenger receives reservation confirmation and payment request from AlFalcon. Passenger sends the payment, AlFalcon passes it to the system. After getting confirmation from the system, AlFalcon issues the ticket to Passenger.
Which object has the least Activation period in your diagram?
Task4. (10 pts)
Watch this video https://www.youtube.com/watch?v=pCK6prSq8aw and answer questions on a piece of paper and post a picture of it:
a) What is Alternative frame? When it is used? Give example from video or your own example.
b) What is an activation boxes in a sequence diagram
c) How many Objects has ATM sequence diagram in the video? What are they, list them.
d) What is the purpose of a sequence diagram?
Task5. (10 pts)
Read this tutorial https://creately.com/blog/diagrams/sequence-diagram-tutorial/ and answer questions on a piece of paper:
a) What is ref mean in the picture? Why it is used here?
b) What is optional fragment in sequence diagram? When it is used?
c) What are the common mistakes in sequence diagram?
d) How to show loops in a sequence diagram? What kind of example given in the tutorial to show loop?
e) What is an asynchronous message? Show the arrow type for asynchronous message.
Task 6. (10 pts)
This picture is taken from https://creately.com/blog/diagrams/sequence-diagram-tutorial/. Describe the following sequence diagram in detail.
Which object is in the diagram, but has no incoming messages? ________________
Task7. Solve test: (20 pts)
1) From the below sequence diagram, which message executes first?
a) withdrawCash(accountNumber, amount)
b) getBalance(accountNumber)
c) Both messages will execute first
d) There is no messages in the diagram
2) Which of the following is not a valid type of message arrow in sequence diagram?
a) Return message
b) Synchronous message
c) Asynchronous message
d) Active message
3) Three notations of UML are __________?
a) Class diagrams, Sequence diagrams, Use case diagrams
b) Canonical diagrams, Activity diagrams, sequence diagrams
c) Class diagrams, ER diagrams, Action diagrams
d) Component diagrams, Action diagrams, Sequence diagrams
4) Which of the following are examples of traditional process models?
a) Waterfall, Incremental, Spiral
b) XP, Scrum, Kanban
c) Spiral, V-Model, Scrum
d) Waterfall, Agile, XP
5) Agile Software methodology is:
a) Both iterative and incremental
b) Sequential
c) Incremental
d) Iterative
6) Sequence diagram shows ________ of the system
a) Structural model
b) Behavioral model
c) Static model
d) Dynamic model
7) Sequence diagrams can be generated directly from code?
a) True
b) False
8) Which of the following diagram is time oriented?
a) Activity diagram
b) Sequence diagram
c) State chart diagram
d) Object diagram
9) Aggregation (encapsulation) relationship is represented in UML notation by
a) Line with solid diamond at one end
b) Line with hollow diamond at one end
c) Line with an arrow at one end
d) Line without an arrow
10) A sequence diagram is a two-dimensional chart. The two dimensions are ...
a) vertical: roles / horizontal: time axis
b) vertical: time axis / horizontal: roles
Bonus: (10 pts)
Draw a sequence diagram for the use-case:
“WonderLand” Online shop delivery process.
1. Shop employee will check for delivery item from the shop system.
2. Shop system will show items to deliver.
3. If there is a delivery item, then
4. If delivery method is urgent, he/she will dispatch item to DHL.
5. If delivery method is ordinary, he/she will dispatch item to Kuwait post office.
6. Then shop employee will check again for delivery item from shop system, and if there is an item to deliver, he/she will continue to dispatch items until there is no delivery item.
1