2012-11-05 17:59:08 -05:00
|
|
|
public class dummyAlgorithm{
|
|
|
|
|
|
|
|
int[] memoryBlock;
|
|
|
|
|
2012-11-06 19:53:11 -05:00
|
|
|
dummyAlgorithm(int memorySize){
|
2012-11-05 17:59:08 -05:00
|
|
|
/* Constructor needed for each algorithm */
|
|
|
|
memoryBlock = new int[memorySize];
|
|
|
|
}
|
|
|
|
|
|
|
|
void allocate(int jobID, int jobSize, int jobTime){
|
|
|
|
/* This method to be overloaded by each algorithm */
|
2012-11-06 19:53:11 -05:00
|
|
|
System.out.println("Allocating job " + jobID + " with size: " + jobSize + " for: " + jobTime + " milliseconds.");
|
2012-11-05 17:59:08 -05:00
|
|
|
}
|
|
|
|
void deallocate(int jobSize, int beginningLocation){
|
2012-11-06 19:53:11 -05:00
|
|
|
System.out.println("Removing job with size: " + jobSize + " beginning at: " + beginningLocation);
|
2012-11-05 17:59:08 -05:00
|
|
|
}
|
|
|
|
}
|