Question: I need a little help writing the java files for the following UML diagram: In the library file the checkin has to check in a

I need a little help writing the java files for the following UML diagram:

I need a little help writing the java files for the following

In the library file the checkin has to check in a book when it's returned. If it belongs in the library and it's being returned, it's status has to be updated, and the patron and due date has to be reset, as well as determining if any fines are due if it's overdue. This needs to update the patron's balance if there are any fines. The return for this method has to indicate success or failure. So, if the book is not in the library, it has to return false. The checkout portion has to allow for checkout with updated status and patron. It also sets the due date 10 days from today. The return also has to do the same thing as in check in. The fines for being overdue are 50 cents per day. The search books has to make use of the constants and return an array of the books found. If none, the array has to have a length of zero.

Driver +main(args Strin Librar AUTHOR SEARCH : char = 'A' +OVERDUE SEARCH : char= 'O' +PATRON SEARCH char'P +TITLE SEARCH: charT -books : Book -patrons : Patron[] +Library(books : Book [], patrons Patron []) +checkin(book : Book): boolean +checkout(book : Book, patron : Patron): boolean +determineFine(book Book): double +searchBooks(key : Object, type : char): Book [I DateUtils +interval(from Date, to date): int +addDays (date: Date, days: int) Date Book +AVAILABLE : int = 1 -UNAVAILABLE : int = 2 -title : String -author String -isbn String -pages : int -year int -status int -due Date -patron : Patron +Book(title : String, author : String, isbn String year : int, pages: int) +checkin) +checkout(patron : Patron, due : Date) +equals(other : Object) : boolean +getX0 +tostringo: String Patron -name String -email String -idNumber int balance double +Patron(name String, email : String, idNumber int, balance double) +adjustBalance(amount : double): double +equals(other : Object) : boolean +tostringo: String

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!