Question: Build a state diagram for the book based upon the following information of the library. The member of the library can borrow a book for
Build a state diagram for the “book” based upon the following information of the library.
The member of the library can borrow a book for number of days as per the policy and return it. On returning a book member must pay a fine if the book is returned after a due date. If the book is not available, then member ask to reserve it so that when it is available, he/she can be informed. When a book is reserved then the member who reserved it either can borrow it or ask for a cancellation as it is not needed any more. When a new book is purchased then it is added to system so the members can use and borrow.
Grading criteria: This question will be graded based upon the following criteria:
- Identification of all the states of book
- Identification of events which trigger a transition of state
- Specification of guards, actions and activities
Step by Step Solution
3.45 Rating (152 Votes )
There are 3 Steps involved in it
To build a state diagram for the book in the library system well need to identify the various states a book can be in the events triggering transitions between these states and any conditions or actions involved in these transitions Steps to Build the State Diagram Step 1 Identify States of the Book The different states a book can be in are 1 Available The book is available for borrowing 2 Borrowed The book is currently borrowed by a library member 3 Reserved The book has been requested by a member but is not currently available 4 Overdue The book has not been returned by the due date 5 Returned The book has been returned to the library 6 Reserved Available The book has been returned and is reserved for a member 7 Acquisition The book is newly acquired and added to the system Step 2 Identify Events Triggering State Transitions The events that cause transitions between states include Borrowing A member borrows the book Returning A member returns the book Reserve Request A member requests a reservation for the book Reservation Cancellation The member cancels the reservation Due Date Passes The book is not returned by the due date Book Acquisition A new book is added to the system Step 3 Specify Guards Actions and Activities Guards are conditions that must be true for a transition ... View full answer
Get step-by-step solutions from verified subject matter experts
