mirror of
https://github.com/bspeice/itcs3146-project
synced 2024-12-22 06:38:23 -05:00
Add the dummy class, and clean up the base algorithm
This commit is contained in:
parent
2c9d884b78
commit
6d140e9021
@ -7,10 +7,10 @@ public class baseAlgorithm{
|
|||||||
memoryBlock = new int[memorySize];
|
memoryBlock = new int[memorySize];
|
||||||
}
|
}
|
||||||
|
|
||||||
void allocate(){
|
void allocate(int jobID, int jobSize, int jobTime){
|
||||||
/* This method to be overloaded by each algorithm */
|
/* This method to be overloaded by each algorithm */
|
||||||
}
|
}
|
||||||
void deallocate(){
|
void deallocate(int jobSize, int beginningLocation){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
17
dummyAlgorithm.java
Normal file
17
dummyAlgorithm.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
public class dummyAlgorithm{
|
||||||
|
|
||||||
|
int[] memoryBlock;
|
||||||
|
|
||||||
|
void dummyAlgorithm(int memorySize){
|
||||||
|
/* 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 */
|
||||||
|
return System.out.println("Allocating job " + jobID + " with size: " + jobSize + " for: " + jobTime + " milliseconds.");
|
||||||
|
}
|
||||||
|
void deallocate(int jobSize, int beginningLocation){
|
||||||
|
return System.out.println("Removing job with size: " + jobSize + " beginning at: " + beginningLocation);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user