Main Page | Alphabetical List | Class List | File List | Class Members

RunBank Class Reference

The RunBank class simulates the interactions between the Customers and the Bank. More...

Collaboration diagram for RunBank:

Collaboration graph
[legend]
List of all members.

Static Public Member Functions

static void main (String args[]) throws IOException
 Main Method for the Bankers Algorithm Project.

Static Public Attributes

static int r
 The number of Resources the Bank has, taken from System.in.
static int c
 The number of Customers the Bank has, taken from System.in.

Static Private Attributes

static Thread[] custThread
 An array for holding Customer Threads.
static Customer[] customer
 An array for holding Customers.

Detailed Description

The RunBank class simulates the interactions between the Customers and the Bank.

The Runbank Class simulates the ineractions that take place between the Customer and the Bank Classes. It contains the main method that initiates the parameters of execution and then starts the appropriate number of threads.

Definition at line 51 of file RunBank.java.


Member Function Documentation

static void RunBank.main String  args[]  )  throws IOException [static]
 

Main Method for the Bankers Algorithm Project.

Recieves input from the user and starts the appropriate number of Customer threads. Once all threads have finished execution the method prints the final Resource and Allocation sets.

Definition at line 63 of file RunBank.java.

References c, customer, custThread, Bank.printAllocationSet(), Bank.printResourceSet(), and r.

Here is the call graph for this function:


Member Data Documentation

int RunBank.c [static]
 

The number of Customers the Bank has, taken from System.in.

Definition at line 56 of file RunBank.java.

Referenced by main().

Customer [] RunBank.customer [static, private]
 

An array for holding Customers.

Definition at line 54 of file RunBank.java.

Referenced by main().

Thread [] RunBank.custThread [static, private]
 

An array for holding Customer Threads.

Definition at line 53 of file RunBank.java.

Referenced by main().

int RunBank.r [static]
 

The number of Resources the Bank has, taken from System.in.

Definition at line 55 of file RunBank.java.

Referenced by main().


The documentation for this class was generated from the following file:
Generated on Mon Oct 17 23:38:46 2005 for Bankers Algorithm by  Cody Precord