fssa-batch3 / fssa-batch3/sec_a_kishor.muruganandham__corejava_project_2
Borrow Module | Borrow Book Feature
- Dominant language
- Java
- Stars
- 7
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
# Borrowing Book Process
### User Story
As a library user, I want to be able to borrow books from the library's collection. When I find a book I want to read, I should be able to request to borrow it. If the book is available, the system should mark it as borrowed and provide me with information about the due date for returning the book. If the book is not available, the system should indicate that the book is currently unavailable for borrowing.
### Task
- [x] Implement Data Access Object (DAO) Layer.
- [x] Implement Service Layer.
- [x] Create JUnit Test Cases.
- [x] Ensure that the tests cases are passing.
- [x] Write clear and concise comments in the code to explain complex logic.
#### DAO
- borrowBook()
#### Service
- borrowBook()
#### Junit Test
- testValidBorrowBook()
- testInvalidBorrowBook()
### Estimation
- 3 hours
# Flowchart
```mermaid
graph TD
A[[Start]] --> |User Initiates Borrow Book| B([Validate Borrow Request])
B --> |Valid| C[(Check Existing Borrow)]
B --> |Invalid| F{{Validation Exception}}
C --> |Borrow Doesn't Exist| E([Check Available Copies])
E --> |Available Copies > 0| I([Check User Borrow Limit])
E --> |No Copies Available| H{{Service Exception}}
I --> |Under Limit| M([Book Borrowed Successfully!])
I --> |Exceeded Limit| H
M --> O[[End]]
F --> H
H --> J([Failed to Borrow Book])
J --> O
style M fill:#dfd,stroke:#333
style J fill:#fdd,stroke:#333
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.