I was working on my project and got stuck in creating a calculateFine() method which should calculate fine. If the student does not return the book after 30 days he has to pay the fine of $5 per day. I am not using a database or anything plain simple java program
Asked
Active
Viewed 15 times
0
-
1Hello and welcome. You should specify the exact problem you're having and the context. It should calculate the fine based on what? Where is the data the method needs? What did you try and where did you get stuck? Please [edit] your question to add some much needed further detail. – Federico klez Culloca Aug 10 '22 at 16:51
-
`LocalDate`, `Period`, `ChronoUnit.DAYS.between`, and `BigDecimal` are your friends here. This has been covered many times already. Always search Stack Overflow before posting. – Basil Bourque Aug 10 '22 at 16:55