diff --git a/Static GUI/CSE201_v1/src/address/Admin.java b/Static GUI/CSE201_v1/src/address/Admin.java index 3d285ab..c5b0a75 100644 --- a/Static GUI/CSE201_v1/src/address/Admin.java +++ b/Static GUI/CSE201_v1/src/address/Admin.java @@ -13,7 +13,6 @@ */ public class Admin extends newUser{ - public ArrayList requestFromStudents; public Admin(String username, String fullname, String email, String password, String repassword, String type) { super(username, fullname, email, password, repassword, type); diff --git a/Static GUI/CSE201_v1/src/address/AllRooms.java b/Static GUI/CSE201_v1/src/address/AllRooms.java index 0dc9296..784af30 100644 --- a/Static GUI/CSE201_v1/src/address/AllRooms.java +++ b/Static GUI/CSE201_v1/src/address/AllRooms.java @@ -6,6 +6,8 @@ package address; import java.util.ArrayList; +import javafx.collections.FXCollections; +import javafx.collections.ObservableList; /** * @@ -13,20 +15,35 @@ */ public class AllRooms { - private ArrayList roomList; - private ArrayList busyRooms; + public static ArrayList roomList; + public static ArrayList busyRooms; // private ArrayList availableRooms; - + public AllRooms() { - roomList = new ArrayList<>(); + roomList = new ArrayList(); + Room C01 = new Room("C01", 100);roomList.add(C01); + Room C02 = new Room("C02", 20);roomList.add(C02); + Room C03 = new Room("C03", 20);roomList.add(C03); + Room C04 = new Room("C04", 20);roomList.add(C04); + Room C11 = new Room("C11", 100);roomList.add(C11); + Room C12 = new Room("C12", 20);roomList.add(C12); + Room C13 = new Room("C23", 20);roomList.add(C13); + Room C14 = new Room("C24", 20);roomList.add(C14); + Room C21 = new Room("C21", 100);roomList.add(C21); + Room C22 = new Room("C22", 20);roomList.add(C22); + Room C23 = new Room("C23", 20);roomList.add(C23); + Room C24 = new Room("C24", 20);roomList.add(C24); + busyRooms = new ArrayList<>(); // availableRooms = new ArrayList<>(); } //getAvailableRooms at given time - public ArrayList getAvailableRooms(Time time){ - ArrayList returnAvailableRooms = new ArrayList<>(); + public static ObservableList getAvailableRooms(Time time){ + ObservableList returnAvailableRooms = FXCollections.observableArrayList(); + for (Room roomIterator : roomList) { +// System.out.println(roomIterator.roomNumber); if(roomIterator.isAvailableAtGivenTime(time)){ returnAvailableRooms.add(roomIterator); } diff --git a/Static GUI/CSE201_v1/src/address/Course.java b/Static GUI/CSE201_v1/src/address/Course.java index 4ebdac3..7b226de 100644 --- a/Static GUI/CSE201_v1/src/address/Course.java +++ b/Static GUI/CSE201_v1/src/address/Course.java @@ -12,8 +12,7 @@ * @author Madhav */ public class Course { - public String name,room,time, acronym, instructor, mandatoryElective, credits, code, monday, tuesday, wednesday, thurdsday, friday, tut, lab, preConditions, postConditions; - //room to be addded + public String name,room,time, acronym, instructor, mandatoryElective, credits, code, monday, tuesday, wednesday, thurdsday, friday, tut, lab, preConditions, postConditions;//room to be addded // private DetailsOfCourse CourseDetails; // private ArrayList postConditions; // private ArrayList preRequisites; diff --git a/Static GUI/CSE201_v1/src/address/Room.java b/Static GUI/CSE201_v1/src/address/Room.java index da158a6..e68bafc 100644 --- a/Static GUI/CSE201_v1/src/address/Room.java +++ b/Static GUI/CSE201_v1/src/address/Room.java @@ -12,10 +12,11 @@ * @author Madhav */ public class Room { - private String roomNumber; - private int capacity; - private ArrayList