- Added returnBook(User, Book) which will update both the users and the
books upon success on returning the book
- Added currentDay() that would return the current date in int array
- Added calDueDate(int) that takes the current date from currentDay()
and calculate the due date from there
- Declared users as ArrayList
- Fixed false declaration method of newUser(String, int)
- Renamed new and old to newUser and oldUser due to ‘new’ unusable
User.java
- Added getId()
UserFactory
- Added simple constructor (to be modified further)
- Added newUser(), getUser(String), getUser(int) for interaction with
the List<User>
- Added update(User, User) to update/replace an item in the List
- Added bookStatus() that will help main program to determine if the
books are not past due
- Added returnBook(int) to remove the returned book from the List
- Fixed List<int> as List<Integer>
- Added import java.util.* for List and ArrayList
- Fixed status with status()
Main.java
- removed redundant newBook()
Book.java
- Added a condition if the book is not overdue
BookFactory.java
- Removed empty newBook()
- Added “throw new NullPointerException()” on both getBook() if Book is
not found
BookFactory.java
- newBook() now returns the new ‘Book’ created instead of ‘void’
- if getBook() failed, it now returns an empty ‘Book’
Book.java
- overdueFine(int[]) is now rewritten
Book.java
- Added comments for Book.java
- Added getter for id
- Added setter for title
- Removed the need of ‘status’ in constructor
- overdueFine(int[]) not commented as it needs to be updated
BookFactory.java
- need for (String status) is removed