Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

NOTE: I am self studying UML so I have nobody to verify my diagrams and hence I am posting here, so please bear with me. This is the problem I got from some PDF available on Google that simply had the following problem statement:

Problem Statement:
A library contains books and journals. The task is to develop a computer system for borrowing books. In order to borrow a book the borrower must be a member of the library. There is a limit on the number of books that can be borrowed by each member of the library. The library may have several copies of a given book. It is possible to reserve a book. Some books are for short term loans only. Other books may be borrowed for 3 weeks. Users can extend the loans.
1. Draw a use case diagram for a library.
2. Give a use case description for two use cases:
• Borrow copy of book
• Extend loan
enter image description here

Use case description:
1. Borrow a copy of the book: If the person wishes to borrow a book from Derpville Public Library, he/she must be a member of the library in which case they will be allowed to issue a certain number of books. If the person is not a member, the book will not be issued to them for taking away, rather they will have to sit and read in the library.
2. Extending loan: Some books will be lent for 3 weeks while others will be lent for more than 3 weeks in which case the person borrowing has to come to the library and get the date extended. There is a limit on how much the user can extend the date of a particular book.

share|improve this question
I recommend reading Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process. This book stresses on the idea of writing use cases and diagrams to understand the project. Don't waste days arguing whether a relation should be an include or extend. Just make sure your diagrams are understandable and have enough information to start implementing a feature. Use case diagrams aren't a goal they are a means :) – Songo Sep 5 '12 at 12:46
I understand the difference between include and extend so no issues there. :) – Dummy Derp Sep 5 '12 at 12:47
up vote 3 down vote accepted

first impressions:

I'd say your include arrows are the wrong way round, it's a little odd that Validate membership isn't included in extend return date? and I'd also be tempted to split these into two or three separate diagrams (so we don't have crossing lines).

However, I'd also say that take 'correct uml' with a pinch of salt, if the diagram is useful to you, and to what you want to communicate, then it is doing its job already.

share|improve this answer
it wont be included either. How can you extend the date of the book if you aren't allowed to issue it in the first place? You can only be given a book if you are a valid member and hence not included in extend date.c However, is it correct overall? – Dummy Derp Sep 5 '12 at 12:44
yep but if you borrow a book as a member, then I can go and extend the date of the loan even though I'm not a member and have nothing to do with the library or yourself. This is not necessarily wrong, but I doubt there are many libraries that would allow this. – jk. Sep 5 '12 at 12:50
I get your point. Although I, as a member, issued the book, there are chances that my friend who is not a member can go to the library and extend the date for me. right? – Dummy Derp Sep 5 '12 at 13:00
possibly it would depend on the particular rules you want. – jk. Sep 5 '12 at 13:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.