Bankers Algorithm in Java

  • Status Closed
  • Budget N/A
  • Total Bids 2

Project Description

An implementation of the Banker's Algorithm for a single "currency" or resource type has been given. A banker has a capital expressed in florins. He accepts any number of borrowers, each of whom has a loan, which may be decreased or increased in units of a florin up to a maximum pre-stated need. Each borrower guarantees that he will eventually return his complete loan. Starting from a safe state, i.e. one where all borrowers can complete their transactions, the banker must decide, when borrower b asks for a florin, whether b will be able to complete his transactions. If so, the situation is safe. Write a Java method to handle multiple currencies: boolean safe(int b, int c) where b  0..B-1 denotes the borrower and c  0..C-1 denotes the currency.

## Deliverables

Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.

## Platform

Coded using JPad

## Deadline information

Need to have the code within about an hour!

Get free quotes for a project like this

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online