Huehive Logo

HueHive

#007BFF
#F8F9FA
#FF6F61
#343A40
#28A745
System description Figure 1 below shows the class diagram of the user interface to a blogging site. The system allows a user to edit blog posts via a web portal, to which the user must log in by providing their account details. Logging in starts a new session for the user and creates a new Session instance. While the session is active the user can access blog posts for editing. The first attempt to access a post triggers an authentication procedure, which sends a random 7-digit number to the user’s stored email address. The portal prompts the user to enter this number, and authentication succeeds (granting access to the post) only if the entered number matches the one that was sent. Once authenticated, the user can change their stored email address. Any attempt to do so triggers immediate re-authentication with the new email address, which must succeed for the change to go ahead. Authentication expires after 60 minutes, or whenever a re-authentication attempt fails. Any attempt to edit posts thereafter requires renewed authentication. The user can close the session at any time. Closing the session destroys the Session instance. Figure 1: Class Diagram. Note that the system is modelled from the Session’s point of view, omitting classes, attributes and operations that are of no relevance to Session. The intended behaviour of a Session instance is specified by six representative scenarios that are shown on the following pages in the form of six sequence diagrams, depicting the interactions between a Session instance and instances of the other classes in the system. Figure 2 shows the simplest scenario: the user logs in and immediately closes the session. Figure 2: Sequence Diagram (session closed immediately) Figure 3 shows a common scenario: the user logs in, edits one blog post and leaves. (The message n = mailNumberTo(addr) generates a random 7-digit number n and sends it to the email address addr. The message promptForNumber() returns a number nUser that the user entered into a popup window on the web portal.) Figure 3: Sequence Diagram (one post edited) Figure 4 shows the user editing three blog posts, the first two within the 60-minute window, the third more than 60 minutes after the first. Note that the second edit does not require re- authentication but the third does. Figure 4: Sequence Diagram (three posts edited; the third edit requires re-authentication) Figure 5 shows the user attempting to authenticate with the wrong code. The system responds with an error message. The user attempts to authenticate again and succeeds this time. Figure 5: Sequence diagram (two attempts to authenticate) Figure 6 shows the user attempting to change their stored email address in between editing two blog posts. However, the authentication code is wrong, so the email address isn’t changed. Figure 6: Sequence Diagram (change of email address fails) Figure 7 shows the user successfully changing their stored email address in between editing two blog posts. Figure 7: Sequence Diagram (change of email address succeeds) Design task Design the inner workings of the Session class by developing a state machine diagram. Determine what states a Session instance goes through, what events trigger state changes, and what activities the Session instance performs. Pay attention to details. Your state machine diagram must use the correct UML syntax and be coherent with the class diagram and the sequence diagrams. You may add new attributes to the Session class in order to design your state machine, but you cannot add new operationsTASKDesign a state machine diagram for the Session class of the UML model presented in SectionInitial Model (starting at page 3). You must produce a design document containing your statemachine diagram, and you must demonstrate your state machine diagram to the modulecoordinator.Design document. The design document should be a single document. The expected size is twopages, excluding cover page. The document must clearly identify the module, the individualmodelling assignment, and your student number, but it should not give your name. Thedocument should contain:• a readable image of your state machine diagram,• a brief description of every state (including its purpose), and• a description (including type and purpose) of any attributes that you have added to theSession class.Your document must include a statement identifying the tool that was used for producing thestate machine diagram; the choice of tool is yours.Demonstration. The demonstrations will take place in person in Cottrell 4B99; each demo willlast 15 to 20 minutes. Demos will be scheduled between 21 and 25 November; slots will becomeavailable for booking on 19 November.At the demo, you will explain how your state machine diagram works and how it realises thebehaviour specified by the class diagram and the sequence diagrams in Section Initial Model. Youmay be asked to discuss design decisions that you have taken when creating your state machinediagram. During the demonstration, you will have access to your own assignment submission onCanvas but not to other module materials or notes
0