Student Identification Form

0 Comment

output message("Please pay ",finesAccrued*0.2)
If nuO less than or equal 1 then
output message ("You can borrow ", maB – booksBorrowed, "books")
output message ("You can borrow 1 book for each overdue book returned")
Function exit
Function calculateFineStatus

‘ Constant to hold the value of maximum number of books allowed per student.
constant integer maxBooksAllowed
‘ Variable to hold the number of books that are overdue for a student
variable integer numBooksOverdue
‘ Variables for holding values of cumulative fines due to overdue books ‘(cumulativeOverdueFine), the amount of overdue fine on books (overdueFine), ‘and interest on the overdue fine that has been accrued (interestOnFinesAccrued)
variable float cumulativeOverdueFine, overdueFine, interestOnFinesAccrued
read student record using studentId
interestOnFinesAccrued = calcInterest(finesAccrued,dateFineLastCalculated)
finesAccrued= finesAccrued + interestOnFinesAccrued
overdueFine = calcFinesForBooksOverdue(studentId)
cumulativeOverdueFine = finesAccrued + overdueFine
output message("You currently owe ", cumulativeOverdueFine)
numBooksOverdue = booksOverdue(studentId)
If finesAccrued