
START Calculate Fine Status
  CALL Calculate recent interest on outstanding fines
  CALL Calculate fines for books currently overdue
  Calculate and report total fines
  CALL Get number of books overdue
  IF Total fines <= £5?\Yes\No
    Request payment in full
  ELSE
    IF Total fines <= £10?\Yes\No
      Request payment of all but £5
    ELSE
      Request payment of 20% of total owed
      ENDIF 
    ENDIF
  IF # of overdue books\<= 1\> 1
    Allow borrowing up to maximum number
  ELSE
    Allow borrowing one book for each overdue book returned
    ENDIF
  END
