Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please only answer if you are sure of the solution Suppose the behaviour of class M is specified with the following state machine evt3 /
Please only answer if you are sure of the solution
Suppose the behaviour of class M is specified with the following state machine evt3 / a2 evt1 / a2 state1 exit a1 state2 entry a3 exit a4 >% state3 entry a4 evt4 a6 evt2 state5 entry a5 state4 exit a5 evt3 / a6 evt2 a. [5 marks] Using the (extended) state design pattern, what will be the structure of the class diagram and what would be the responsibilities of the different operations (shown in pseudo code) for realizing the desired behaviour? (Hint: see slide 155 from System Design) b. [5 marks] Suppose that an instance of class M has just been created and therefore is in state1 Assuming that the following sequence of events is received: evt1, evt3, evt2, represent in a sequence diagram the messages exchanged by the instances of the classes from the answer to 5.a. (Hint: see slide 156) Suppose the behaviour of class M is specified with the following state machine evt3 / a2 evt1 / a2 state1 exit a1 state2 entry a3 exit a4 >% state3 entry a4 evt4 a6 evt2 state5 entry a5 state4 exit a5 evt3 / a6 evt2 a. [5 marks] Using the (extended) state design pattern, what will be the structure of the class diagram and what would be the responsibilities of the different operations (shown in pseudo code) for realizing the desired behaviour? (Hint: see slide 155 from System Design) b. [5 marks] Suppose that an instance of class M has just been created and therefore is in state1 Assuming that the following sequence of events is received: evt1, evt3, evt2, represent in a sequence diagram the messages exchanged by the instances of the classes from the answer to 5.a. (Hint: see slide 156)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started