Text: Case 2: Borrowing Book System (BBS)
Suppose we have the following scenario for borrowing books from the college book store, where only students can borrow books.
1. After having put the books in his/her basket, the student shows up to the counter for checkout.
2. The staff indicates to the BBS system that a new loan just started.
3. The staff checks the membership of the student, using SID.
4. The staff scans barcodes for the different books. Each book has a barcode.
5. For each scanned book, the BBS system displays the title of the book and its borrowing price per week [PW]. For instance, the book B1 price is $1 per week.
6. For each book, the staff also enters the number of borrowing weeks [NOW].
7. Once there are no more books to scan, the staff informs the BBS system.
8. The BBS system saves the loan with loan (LID), SID, and date. A loan may have many books and a book is borrowed in many loans. [NOW] may be different for each book in each loan. For instance, in the loan L1, the book B1 is borrowed for 15 weeks.
9. At any time, the student can pay by requesting the total to pay, giving a LID. If the payment is by card, the card is checked against an authorization system (e.g., Visa). In addition, the student may have a waiving code. In this case, a discount is computed.
10. The BBS system prints out a receipt. A receipt has a reference [REF].
11. The BBS system records the payment with a LID, receipt reference [REF], payment date, and amount paid.
Q1] Draw the Class Diagram, describing each class with its attributes, methods, and associations