Updated to include methods from base Algorithm

This commit is contained in:
dpturnbull 2012-11-06 19:14:53 -05:00
parent 1525dc4d41
commit 43890ea1b9
3 changed files with 20 additions and 1 deletions

BIN
FirstFit.class Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@
*/ */
//this section sets up the Car class //this section sets up the Car class
class FirstFit class FirstFit extends baseAlgorithm
{ {
//this section sets up the private elements of the class //this section sets up the private elements of the class
@ -25,6 +25,25 @@ class FirstFit
private int[][] memTable = new int[memSize+2][6]; private int[][] memTable = new int[memSize+2][6];
void baseAlgorithm(int memorySize)
{
/* Constructor needed for each algorithm */
memoryBlock = new int[memorySize];
memSize=memorySize;
}
void allocate(int jobID, int jobSize, int jobTime)
{
/* This method to be overloaded by each algorithm */
}
void deallocate(int jobSize, int beginningLocation)
{
}
//this is a no argument constructor //this is a no argument constructor
public FirstFit() public FirstFit()
{ {

BIN
baseAlgorithm.class Normal file

Binary file not shown.