mirror of
				https://github.com/bspeice/itcs3146-project
				synced 2025-11-03 18:10:29 -05:00 
			
		
		
		
	Updated to include methods from base Algorithm
This commit is contained in:
		
							
								
								
									
										
											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.
										
									
								
							
		Reference in New Issue
	
	Block a user