src中是所有程式碼,基本上只需要它
類圖在UMLDiagram中
要確保sampleInput與Main在同層目錄,否則會讀不到
• Consider a small library system with the following transactions:
- Check out a copy of a book/ Return a copy of a book.
- Add a copy of a book to/ Remove a copy of a book from the library.
- Get the list of books by a particular author or in a particular subject area.
- Find out the list of books currently checked out by a particular borrower.
- Find out what borrower last checked out a particular copy of a book.
• There are two types of users: staff users and ordinary borrowers.
• Transactions 1, 2, 4 and 5 are restricted to staff users, except that ordinary borrowers can perform transaction 4 to find out the list of books currently borrowed by themselves.
• The system must also satisfy the following constraints: - All copies in the library must be available for check-out or checked out.
- No copy of a book may be both available and checked out at the same time.
- A borrower may not have more than a pre-defined number of books checked out at one time.
類圖使用工具: PlantUML