Download presentation
Presentation is loading. Please wait.
Published byJack Blankenship Modified over 9 years ago
1
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour EXAMPLES
2
State Machine Diagram (1) You shall model the lifecycle of an application to a university graduate program. Potential students who apply to graduate programs need to provide their personal information as well as recommendation letters from former employers or professors. The lifecycle must reflect that: 1.Once created, an application needs to be verified for completeness. 2.An incomplete application may require additional information from the student (a university transcript, the results of an English/French test, or the payment of the application fees!) or from recommenders (the famous letters!). 3.Once evaluated, a complete application (where the information and the letters have been provided) is usually accepted or rejected. 4.The evaluation of an application may however also be postponed if the decision would be too close to the beginning of the next semester © Lethbridge/Laganière 2012 Chapter 8: Modelling Interactions and Behaviour2
3
State Machine Diagram (cont’d) In the following, the variables are: allStudentInfo (a Boolean): true iff all the required student info (transcript, language test, fees) have been received. allRecLetters (a Boolean): true iff all the required letters from recommenders have been received. tooClose (a Boolean): true iff the current date is such that the decision would be too close to the beginning of the next semester. acceptable (a Boolean): true iff the student is found admissible. © Lethbridge/Laganière 2012 Chapter 8: Modelling Interactions and Behaviour3
4
Activity Diagram – for the processing of a stock trade The online stock broker first verifies the order against the customer’s account, then executes it with the stock exchange. If the order executes succesfully, the system does three things concurrently: 1.Emails trade confirmation to the customer 2.Updates the online portfolio to reflect the results of the trade 3.And settles the trade with the other party by debiting the account When all three tasks are completed, the system closes the order. If the order execution fails, then the system sends a failure notice to the customer and closes the order. © Lethbridge/Laganière 2012 Chapter 8: Modelling Interactions and Behaviour4
5
Sequence Diagrams Draw sequence diagrams representing the following interaction: (a) A client searches for a book in a library. He or she then asks to borrow the book. If a copy of this book is available, a loan object is created. © Lethbridge/Laganière 2012 Chapter 8: Modelling Interactions and Behaviour5
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.