-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGarage.java
37 lines (31 loc) · 856 Bytes
/
Garage.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package project;
import java.util.Scanner;
public class Garage {
private String garageName, ownerName;
public Slots[] array;
public Garage() {
array = new Slots[5];
for (int i=0; i<5; i++){
array[i] =new Slots();
}
}
public Garage(String g, String o ) {
this.garageName = g;
this.ownerName = o;
array = new Slots[5];
}
public Slots[] getArray() {
return array;
}
public int selectAlgotithm()
{
int system;
System.out.println();
System.out.println("which Algorithm do you want to select ?: ");
System.out.println("1.first come first served slot ");
System.out.println("2. best fit slot ");
Scanner input=new Scanner(System.in);
system=input.nextInt();
return system ;
}
}