feat: add Lab4

This commit is contained in:
Yadunand Prem
2022-09-15 11:21:56 +08:00
parent c4d857ed02
commit 46d4fa5e9d
116 changed files with 912 additions and 2 deletions

34
Lab1/Customer.java Normal file
View File

@@ -0,0 +1,34 @@
/**
* This is a data class which holds information about the Customer.
* It has a incrementing counter for the customer id;
*
* @author Yadunand Prem
* @version CS2030S AY22/23 Semester 2
*/
public class Customer {
private static int lastId = 0;
private final int id;
private final double serviceTime;
private final double arrivalTIme;
public Customer(double serviceTime, double arrivalTime) {
this.id = lastId++;
this.serviceTime = serviceTime;
this.arrivalTIme = arrivalTime;
}
public double getServiceTime() {
return this.serviceTime;
}
public double getArrivalTIme() {
return arrivalTIme;
}
@Override
public String toString() {
return "C" + id;
}
}