mirror of
https://github.com/bspeice/itcs3146-project
synced 2024-11-09 09:38:23 -05:00
Updated to include methods from base Algorithm
This commit is contained in:
parent
1525dc4d41
commit
43890ea1b9
BIN
FirstFit.class
Normal file
BIN
FirstFit.class
Normal file
Binary file not shown.
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
//this section sets up the Car class
|
||||
class FirstFit
|
||||
class FirstFit extends baseAlgorithm
|
||||
{
|
||||
|
||||
//this section sets up the private elements of the class
|
||||
@ -25,6 +25,25 @@ class FirstFit
|
||||
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
|
||||
public FirstFit()
|
||||
{
|
||||
|
BIN
baseAlgorithm.class
Normal file
BIN
baseAlgorithm.class
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user