diff --git a/FirstFit.class b/FirstFit.class new file mode 100644 index 0000000..b95fa11 Binary files /dev/null and b/FirstFit.class differ diff --git a/FirstFit.java b/FirstFit.java index deb173d..aa78452 100644 --- a/FirstFit.java +++ b/FirstFit.java @@ -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() { diff --git a/baseAlgorithm.class b/baseAlgorithm.class new file mode 100644 index 0000000..6eddea2 Binary files /dev/null and b/baseAlgorithm.class differ