From a3f6e8c4dcd50cf5fa2061c2cc2ee0904b77e896 Mon Sep 17 00:00:00 2001 From: sageTheDM Date: Tue, 19 Nov 2024 16:10:52 +0100 Subject: [PATCH] total pain --- .../CO2-Daten-Projekt-V2/bin/App.class | Bin 7223 -> 9439 bytes .../CO2-Daten-Projekt-V2/bin/Co2Data.class | Bin 4432 -> 4432 bytes .../CO2-Daten-Projekt-V2/bin/Date.class | Bin 2152 -> 1568 bytes .../CO2-Daten-Projekt-V2/bin/FillTable.class | Bin 4623 -> 5391 bytes .../CO2-Daten-Projekt-V2/bin/Lesson.class | Bin 1013 -> 1013 bytes .../CO2-Daten-Projekt-V2/bin/Points.class | Bin 969 -> 969 bytes .../CO2-Daten-Projekt-V2/bin/Teacher.class | Bin 1710 -> 1710 bytes .../Steiner/CO2-Daten-Projekt-V2/src/App.java | 171 +++++++++--- .../CO2-Daten-Projekt-V2/src/Date.java | 30 +- .../CO2-Daten-Projekt-V2/src/FillTable.java | 261 ++++++++++-------- 10 files changed, 294 insertions(+), 168 deletions(-) diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/App.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/App.class index d32077e6087db2f09836c3b5423f03a817741143..d4d89f4c2446cbc08dcd594a9dc08d6e42c34515 100644 GIT binary patch literal 9439 zcmcgydwg8Qbv{S?xU1E*Ez6Q@$(FgsFWDB7EMwW0{J@rM5RoNg$u_dV=4$s!TD;m_ zcJKPZBM@R9A{<&h>p9wcdK)1*z4($FN3w4_Pev`rxDcjn$* zT?w~M{z&&{?VXuBbLPxB-}&auc)#}hXPzG)r#2qbsEEn8IhE4L&s2K3dB|*tn~A}O z?*7ZIh|Q#BB4#3CrI}`Rs<&A?7H{Zr8e5sdJG;BLA86~|)z!n|%Pj}Zun~qL)Y}o2G`{Nc<$-aI2Iyd7 zROYNot+~fe#}b1w-`1{nB^9HksKmh*Qg-Ep++L29>B@{DYVXRPD1g#gk3v33$?WeytOq>P0#nl)SKZmk6Sup85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SVSm(ewce|QEl)%fQZI9&U0rSbnbF+2awvb7BgUs)~${C;lf=$ThU=9YPf+ZW#O)~( z@;yviPcjX@7u)eZ67T&=ZG)!rSca%fdLbq$S#9`n2us9mOd6p;GLx$eu97D4BgH&1 z2{V29C1@oLYZfh@yG0{+O3A5;{?*UOFdr_8O|v+yG;XEFMbTCi9csMmGL94le-HDw zC~hx`?&YGVD0+7`hM$FA6#YfP(5`R11bUFIWlG8&lrlU2HA!EwcOf(7Cc8fo$Ey7O#Xt#f2CV lqa0n!d~lj$_lo=ZiaW_mc`ESxfXHx-ysA$NTbxDx_W}QRzuf=; diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Co2Data.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Co2Data.class index 2fbf11af4036dea7277f4d3493b56279942e6ee7..16088b71ef0c85f40d249a499009d4958cb8dd1a 100644 GIT binary patch delta 17 ZcmcbhbU}&Z)W2Q({{Lri-pJu02mn-u2!H?p delta 17 ZcmcbhbU}&Z)W2Q(7#J9AH*$Cg0suvK27CYj diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Date.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Date.class index 39bf06bff68e2c11ecdde3fd119cff76bc3a7cc2..f7892e52a39ec976f2fd7f23a59610063e876c82 100644 GIT binary patch delta 450 zcmYk&NiRcD7{>Acx%alEic%#aHKe45R?TBg5t2q&s0Fcc35}@{gr&8moP{kbY=lHY zB-q>e7UC;N@H(-uIB$Mue4m{6;90=``t|ty{mnRoxBg*ORG8U!S2m~JojG@TYgHdx z^(wBft%$dkHXlj-W|iCRbm$MOp}LD6AKi-JhI`;9x7=Jdnc3f6&t(Jj(x(&liOSP2 zb~@t6p@4h>6j4Y>Y9+mrA!>hPf~icQB6CIbV%)_hb~6xCM}wgbn^_b%plvOIAn+;hB;=0 z6FGIt80YdK7feb>5Ep;+$l#!49$>Jvy9@%Q5*~Hm{HGUT$RoasGguP%l-w}Qw rky&s=AtR5d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r4{Q7cM|BV$qgW#E%7pisg_tNfN%hl9@(iu+@!8Or`Md3=${O}ZiQxC$HBo}bX2naHVWk{DCe z@}&L-dHtoHW&W}V~rijEd;;(c|y>RiPK%7R7p4LEaDIQ(Gd)e|zt bOXc57^w3qQnD_V#9bo+-nBhm2Yw^?H!j=p* delta 483 zcmXBQ$xB;N7{=k>$%Pn$h^EpK2eewLICOBFnJGtc4XSJDZ_fuA#F@K%kzKM!*eCo`@OFlUS2=agy z3J57X^lyZR?$hjC6AY4~hy_Ymq?BbIvq}ZusB~@rwTaf?p_VvxB$RJ>#s<&XQSS1B z8(#8H`JZ~zOoNFiV>FuYG?|~uUo^X^oKq8R7ZVcGAtodyEasJ%u$YLLPB9TNQMJcR zpVFpF?cHWexlNDzBUemZOs|+eF}-5?#SDn)7h{VV6l04S67yQjkeGy+VKE6YBhGH# zpQg8($UDtolw!uH;=OM0fmV`4`6zc>D-+Bz$rtTgVVX5QJ5K)QfHoK`4b}>r?I}Du iG@7x|`>QSiW%tV*OUOJHC#o{*7U!xwsxS2A;qne4B3wrR diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Lesson.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Lesson.class index 51ac342989c807a4a4e34719f634e8d23c622dc0..44b19f700eaa307e1ae7f9fccfce7d068d54caef 100644 GIT binary patch delta 17 Zcmey${*|5M)W2Q({{Lri-pKKm830!}2`c~q delta 17 Zcmey${*|5M)W2Q(7#J9AH*&mX1^`GY2PXgk diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Points.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Points.class index 7bdc7b645e1e76c29d2b1297432f0c8b21ac9598..c9f8daa3cd34430c38abe69d4ba21e1f97b05aa0 100644 GIT binary patch delta 17 ZcmX@fev+Nz)W2Q({{Lri-pFx~830jW2&Vu5 delta 17 ZcmX@fev+Nz)W2Q(7#J9AH*y?g1^_})2BQD~ diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Teacher.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Teacher.class index 7db2754722218fe6a88a5599cf809dfa0b8d435e..f01531c910fa21376cb6da66b2244da88ebcf19e 100644 GIT binary patch delta 17 ZcmZ3-yN;LR)W2Q({{Lri-pH|x4FFDo2xR~O delta 17 ZcmZ3-yN;LR)W2Q(7#J9AH*zdv0{}mA24MgI diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java index 5222634..e440e0f 100644 --- a/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java @@ -12,14 +12,37 @@ public class App { public static final Lesson[][][] timeTable = new Lesson[ROOM_COUNT][DAY_COUNT][LESSON_COUNT]; private static final Teacher[] teachers = new Teacher[Teacher.nameMap.size()]; - // URLs for fetching CO2 data - private static final String ROOM_39_URL = "https://api.thingspeak.com/channels/1521262/feeds.csv?results=8000"; - private static final String ROOM_38_URL = "https://api.thingspeak.com/channels/1364580/feeds.csv?results=8000"; - private static final String ROOM_37_URL = "https://api.thingspeak.com/channels/1521263/feeds.csv?results=8000"; + // Date constants + private static final int START_YEAR = 2024; + private static final int START_MONTH = 11; // November + private static final int START_DAY = 4; + private static final String START_DATE = String.format("%d-%02d-%02d%%2000:00:00", START_YEAR, START_MONTH, + START_DAY); - private static final List room39Data = Co2Data.getData(ROOM_39_URL, 39); - private static final List room38Data = Co2Data.getData(ROOM_38_URL, 38); - private static final List room37Data = Co2Data.getData(ROOM_37_URL, 37); + private static final int END_YEAR = 2024; + private static final int END_MONTH = 11; // November + private static final int END_DAY = 8; + private static final String END_DATE = String.format("%d-%02d-%02d%%2000:00:00", END_YEAR, END_MONTH, END_DAY); + + // Room channel numbers + private static final int ROOM_39_NUMBER = 1521262; + private static final int ROOM_38_NUMBER = 1364580; + private static final int ROOM_37_NUMBER = 1521263; + + // Room URLs + private static final String ROOM_39_URL = createUrl(ROOM_39_NUMBER); + private static final String ROOM_38_URL = createUrl(ROOM_38_NUMBER); + private static final String ROOM_37_URL = createUrl(ROOM_37_NUMBER); + + // Room data + private static final List ROOM_39_DATA = Co2Data.getData(ROOM_39_URL, 39); + private static final List ROOM_38_DATA = Co2Data.getData(ROOM_38_URL, 38); + private static final List ROOM_37_DATA = Co2Data.getData(ROOM_37_URL, 37); + + private static String createUrl(int channelNumber) { + return String.format("https://api.thingspeak.com/channels/%d/feeds.csv?start=%s&end=%s", channelNumber, + START_DATE, END_DATE); + } // #region Initialization private static void initializeTeachers() { @@ -36,21 +59,21 @@ public class App { } // #region Calculation - private static void calculatePoints(List data) { + private static void calculatePoints(List data, int roomNumber) { for (Co2Data co2Data : data) { Date temp = co2Data.getDate(); int intHour = temp.getHour(); int intMinute = temp.getMinute(); - int intDay = temp.getDay(); if (FillTable.isBreak(intHour, intMinute)) { - String whatBreak = FillTable.whatBreakIsIt(intHour, intMinute, intDay); + String whatBreak = FillTable.whatBreakIsIt(intHour, intMinute); + int[] time = FillTable.whatTime(intHour, intMinute); switch (whatBreak) { case "short": - calculateFiveMinuteBreakPoints(co2Data); + calculateFiveMinuteBreakPoints(data, time, roomNumber); break; case "long": - calculateLongerBreakPoints(co2Data); + calculateLongerBreakPoints(data, time, roomNumber); break; default: @@ -60,18 +83,106 @@ public class App { } } - private static int calculateFiveMinuteBreakPoints(Co2Data data) { - calculateBonusPoints(data); - return 5; + private static int calculateFiveMinuteBreakPoints(List data, int[] time, int roomNumber) { + // Calculate the time range for the break (e.g., a 5-minute break) + int startMinute = time[0]; + int endMinute = time[1]; + + int points = 5; // Start with maximum points + + // Loop over each minute in the break and check the CO2 level + for (int i = startMinute; i < endMinute; i++) { + // Get the CO2 data for the current minute (using the data list) + Co2Data minuteData = getCo2DataForMinute(data, i); // data is already a List + + if (minuteData != null) { + int currentCo2 = minuteData.getCo2Level(); + Co2Data previousMinuteData = getCo2DataForMinute(data, i - 1); // data is a List + + if (previousMinuteData != null) { + int previousCo2 = previousMinuteData.getCo2Level(); + + // If CO2 level doesn't decrease, subtract points + if (currentCo2 >= previousCo2) { + points--; + } + } + } + } + + // After calculating the points, consider any bonus points for teacher switch or + // other criteria + points += calculateBonusPoints(data, time, roomNumber); + + return Math.max(points, 0); // Ensure that points don't go below zero } - private static int calculateLongerBreakPoints(Co2Data data) { - calculateBonusPoints(data); - return 10; + private static int calculateLongerBreakPoints(List data, int[] time, int roomNumber) { + // Take the time for the entire break + int startMinute = time[0]; + int endMinute = time[1]; + + int points = 10; // Start with maximum points for longer break + + // Loop over each minute in the break and check the CO2 level + for (int i = startMinute; i < endMinute; i++) { + // Get the CO2 data for the current minute (using the data list) + Co2Data minuteData = getCo2DataForMinute(data, i); // data is already a List + + if (minuteData != null) { + int currentCo2 = minuteData.getCo2Level(); + Co2Data previousMinuteData = getCo2DataForMinute(data, i - 1); // data is a List + + if (previousMinuteData != null) { + int previousCo2 = previousMinuteData.getCo2Level(); + + // If CO2 level doesn't decrease, subtract points + if (currentCo2 >= previousCo2) { + points--; + } + } + } + } + + // After calculating the points, consider any bonus points for teacher switch or + // other criteria + points += calculateBonusPoints(data, time, roomNumber); + + return Math.max(points, 0); // Ensure that points don't go below zero } - private static int calculateBonusPoints(Co2Data data) { - return 5; + private static int calculateBonusPoints(List data, int[] time, int roomNumber) { + // Check if the next lesson isn't lunch or the same teacher (if the next lesson + // is lunch, no bonus points possible) + boolean isTeacherChange = isTeacherChange(data, roomNumber); // Check if the teacher is changing + boolean isNextLessonLunch = isNextLessonLunch(data, roomNumber); + + if (!isNextLessonLunch && isTeacherChange) { + return 5; // Bonus points for teacher switch + } else { + return 0; // No bonus points + } + } + + private static boolean isTeacherChange(List data, int roomNumber) { + + return false; // Placeholder logic + } + + private static boolean isNextLessonLunch(List data, int roomNumber) { + // Logic to check if the next lesson is lunch (can be based on time and lesson + // schedule) + return false; // Placeholder logic + } + + private static Co2Data getCo2DataForMinute(List data, int minute) { + // Logic to get the CO2 data for a specific minute in the break + for (Co2Data co2Data : data) { + if (co2Data.getDate().getMinute() == minute) { + return co2Data; + } + } + return null; // Return null if no data matches } // #region Sorting Printing @@ -109,10 +220,8 @@ public class App { while (true) { if (scanner.hasNextInt()) { return scanner.nextInt(); - } else { - System.out.println("Invalid input. Please enter a number."); - scanner.next(); } + scanner.next(); // Clear invalid input } } @@ -120,7 +229,8 @@ public class App { System.out.println("Point calculation explanation:"); System.out.println("1. Up to 5 points for keeping the window open during a small pause."); System.out.println("2. Up to 10 points for long pauses, depending on window usage."); - System.out.println("3. 5 bonus points for teacher switches in the room."); + System.out.println("3. 5 bonus points for teacher switches in classrooms."); + System.out.println("4. Deduct points if CO2 levels are too high."); } private static void printShutDown() { @@ -130,17 +240,16 @@ public class App { try { Thread.sleep(1000); } catch (InterruptedException e) { - Thread.currentThread().interrupt(); + e.printStackTrace(); } } - System.out.println("Goodbye!"); } // @TODO: remove this before hand-in deadline public static void debbugingValueLists(List data) { // Debugging co2Data int index = 0; - for (Co2Data a : room37Data) { + for (Co2Data a : data) { System.out.println(a.toString()); index++; } @@ -153,16 +262,16 @@ public class App { public static void main(String[] args) { boolean debbugingList = false; if (debbugingList) { - debbugingValueLists(room37Data); + debbugingValueLists(ROOM_37_DATA); // debbugingValueLists(room38Data); // debbugingValueLists(room39Data); } else { System.out.println("Calculations in process please do not shut off..."); fillInTimeTable(); initializeTeachers(); - calculatePoints(room37Data); - calculatePoints(room38Data); - calculatePoints(room39Data); + calculatePoints(ROOM_37_DATA, 37); + calculatePoints(ROOM_38_DATA, 38); + calculatePoints(ROOM_39_DATA, 39); sortTeachers(); printTeachers(); while (true) { diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java index e37fcc5..4c16b0b 100644 --- a/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java @@ -1,6 +1,3 @@ -import java.util.Calendar; -import java.util.GregorianCalendar; - public class Date { // #region Fields private int day; @@ -42,34 +39,9 @@ public class Date { return minute; } - // #region Helper Method to Check Daylight Saving Time - private boolean isDaylightSavingTime() { - Calendar calendar = new GregorianCalendar(); - calendar.set(year, month - 1, day); // Month is 0-based in Calendar - - // Last Sunday in March (DST starts) - Calendar lastSundayInMarch = new GregorianCalendar(year, Calendar.MARCH, 31); - lastSundayInMarch.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); - lastSundayInMarch.add(Calendar.DATE, -7); // Go back to last Sunday of March - - // Last Sunday in October (DST ends) - Calendar lastSundayInOctober = new GregorianCalendar(year, Calendar.OCTOBER, 31); - lastSundayInOctober.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY); - lastSundayInOctober.add(Calendar.DATE, -7); // Go back to last Sunday of October - - // Check if the current date is within the DST period - return calendar.after(lastSundayInMarch) && calendar.before(lastSundayInOctober); - } - // #region Adjust UTC to Switzerland Time private void adjustForSwitzerlandTime() { - if (isDaylightSavingTime()) { - // Switzerland is UTC +2 during DST (CEST) - hour += 2; - } else { - // Switzerland is UTC +1 during Standard Time (CET) - hour += 1; - } + hour += 1; // Adjust if the hour exceeds 24 or falls below 0 if (hour >= 24) { diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java index 6b2fc05..594f5b0 100644 --- a/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java @@ -1,120 +1,165 @@ public class FillTable { - // #region Constants - private static final String[] START_TIMES = { - "7:45", "8:35", "9:40", "10:30", "11:20", "12:10", "12:50", - "13:35", "14:25", "15:15", "16:15", "17:05" - }; + // #region Constants + private static final String[] START_TIMES = { + "7:45", "8:35", "9:40", "10:30", "11:20", "12:10", "12:50", + "13:35", "14:25", "15:15", "16:15", "17:05" + }; - private static final String[] END_TIMES = { - "8:30", "9:20", "10:25", "11:15", "12:05", "12:50", "13:30", - "14:20", "15:10", "16:10", "17:00", "17:50" - }; + private static final String[] END_TIMES = { + "8:30", "9:20", "10:25", "11:15", "12:05", "12:50", "13:30", + "14:20", "15:10", "16:10", "17:00", "17:50" + }; - // #region Helper Methods - private static void fillTable(String[] teacherShortNames, String day, String[] startTime, String[] endTime, - int roomIndex) { - int dayIndex = getDayIndex(day); - for (int i = 0; i < teacherShortNames.length && i < startTime.length && i < endTime.length; i++) { - Teacher teacher = new Teacher(teacherShortNames[i]); // Initialize Teacher with shortform - App.timeTable[roomIndex][dayIndex][i] = new Lesson(roomIndex, teacher.getName(), startTime[i], - endTime[i], - day); + // #region Helper Methods + private static void fillTable(String[] teacherShortNames, String day, String[] startTime, String[] endTime, + int roomIndex) { + int dayIndex = getDayIndex(day); + for (int i = 0; i < teacherShortNames.length && i < startTime.length && i < endTime.length; i++) { + Teacher teacher = new Teacher(teacherShortNames[i]); // Initialize Teacher with shortform + App.timeTable[roomIndex][dayIndex][i] = new Lesson(roomIndex, teacher.getName(), startTime[i], + endTime[i], + day); + } + } + + private static int getDayIndex(String day) { + switch (day) { + case "Monday": + return 0; + case "Tuesday": + return 1; + case "Wednesday": + return 2; + case "Thursday": + return 3; + case "Friday": + return 4; + default: + return -1; + } + } + + // #region Fill 37 + static void fill37TimeTable() { + int roomIndex = 0; + fillTable(new String[] { "Hm", "Hm", "Hi", "Hm", "Hm", "Lunch", "Bd", "Gi", "Gi", "Ts", "Ts", "" }, + "Monday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Ts", "Ts", "Ts", "Ts", "Le", "Lunch", "Lunch", "Fh", "Fh", "Fh", "Fh", "" }, + "Tuesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Lu", "Lu", "Lu", "Lu", "Cg", "Cg", "Lunch", "Se", "Se", "Se", "Se", "" }, + "Wednesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Gi", "Gi", "Ba", "Ba", "Ba", "Lunch", "Bd", "Du", "Lz", "Lz" }, + "Thursday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Kp", "KP", "Or", "Vt", "Vt", "Lunch", "Lunch", "Du", "Du", "Du", "", "" }, + "Friday", START_TIMES, END_TIMES, roomIndex); + } + + // #region Fill 38 + static void fill38TimeTable() { + int roomIndex = 1; + fillTable(new String[] { "Bz", "Bz", "Bz", "Bz", "Bz", "Lunch", "Lunch", "Hn", "Hn", "Bu", "Hn", "Hn" }, + "Monday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Kg", "Kg", "Eh", "Re", "Re", "Lunch", "Lunch", "Bt", "Kh", "Kh", "", "" }, + "Tuesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Cg", "Cg", "Cg", "Cg", "Es", "Lunch", "Lunch", "Cg", "Cg", "", "", "" }, + "Wednesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Do", "Do", "Gr", "Gr", "Or", "Lunch", "Lunch", "Bu", "Bu", "Zu", "", "" }, + "Thursday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "", "Hu", "Ge", "Eh", "Eh", "Bu", "Lunch", "Eh", "Eh", "", "", "" }, + "Friday", START_TIMES, END_TIMES, roomIndex); + } + + // #region Fill 39 + static void fill39TimeTable() { + int roomIndex = 2; + fillTable(new String[] { "Bd", "Bd", "Bd", "Bd", "Bd", "Lunch", "Lunch", "Lu", "Lu", "Lu", "Lu", "" }, + "Monday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Do", "Do", "Zu", "Zu", "Zu", "Lunch", "Lunch", "Se", "Se", "Se", "Se", "" }, + "Tuesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Cg", "Cg", "Cg", "Cg", "Bu", "Lunch", "Lunch", "Gi", "Gi", "Gi", "Gi", "" }, + "Wednesday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Bd", "Bd", "Bd", "Bd", "Or", "Lunch", "Lunch", "Le", "Le", "Le", "", "" }, + "Thursday", START_TIMES, END_TIMES, roomIndex); + fillTable(new String[] { "Gi", "Gi", "Gr", "Gr", "Gi", "Lunch", "Lunch", "Hi", "Hi", "Hi", "", "" }, + "Friday", START_TIMES, END_TIMES, roomIndex); + } + + static boolean isBreak(int intHour, int intMinute) { + // Check if the time is between 7 AM and 5 PM + if (intHour >= 7 && intHour <= 17) { + // Check if the time falls between any lesson start and end times + for (int i = 0; i < START_TIMES.length; i++) { + // Split the start and end times into hours and minutes + String[] startTime = START_TIMES[i].split(":"); + String[] endTime = END_TIMES[i].split(":"); + + int startHour = Integer.parseInt(startTime[0]); + int startMinute = Integer.parseInt(startTime[1]); + int endHour = Integer.parseInt(endTime[0]); + int endMinute = Integer.parseInt(endTime[1]); + + // Check if the given time is during the current lesson + if ((intHour > startHour || (intHour == startHour && intMinute >= startMinute)) && + (intHour < endHour || (intHour == endHour && intMinute < endMinute))) { + return false; // It's not a break, it's during a lesson } + } + return true; // If no lessons match, it must be a break } - private static int getDayIndex(String day) { - switch (day) { - case "Monday": - return 0; - case "Tuesday": - return 1; - case "Wednesday": - return 2; - case "Thursday": - return 3; - case "Friday": - return 4; - default: - return -1; - } - } + return false; // Time is outside of the school hours (7 AM to 6 PM roughly) + } - // #region Fill 37 - static void fill37TimeTable() { - int roomIndex = 0; - fillTable(new String[] { "Hm", "Hm", "Hi", "Hm", "Hm", "Lunch", "Bd", "Gi", "Gi", "Ts", "Ts", "" }, - "Monday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Ts", "Ts", "Ts", "Ts", "Le", "Lunch", "Lunch", "Fh", "Fh", "Fh", "Fh", "" }, - "Tuesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Lu", "Lu", "Lu", "Lu", "Cg", "Cg", "Lunch", "Se", "Se", "Se", "Se", "" }, - "Wednesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Gi", "Gi", "Ba", "Ba", "Ba", "Lunch", "Bd", "Du", "Lz", "Lz" }, - "Thursday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Kp", "KP", "Or", "Vt", "Vt", "Lunch", "Lunch", "Du", "Du", "Du", "", "" }, - "Friday", START_TIMES, END_TIMES, roomIndex); - } - - // #region Fill 38 - static void fill38TimeTable() { - int roomIndex = 1; - fillTable(new String[] { "Bz", "Bz", "Bz", "Bz", "Bz", "Lunch", "Lunch", "Hn", "Hn", "Bu", "Hn", "Hn" }, - "Monday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Kg", "Kg", "Eh", "Re", "Re", "Lunch", "Lunch", "Bt", "Kh", "Kh", "", "" }, - "Tuesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Cg", "Cg", "Cg", "Cg", "Es", "Lunch", "Lunch", "Cg", "Cg", "", "", "" }, - "Wednesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Do", "Do", "Gr", "Gr", "Or", "Lunch", "Lunch", "Bu", "Bu", "Zu", "", "" }, - "Thursday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "", "Hu", "Ge", "Eh", "Eh", "Bu", "Lunch", "Eh", "Eh", "", "", "" }, - "Friday", START_TIMES, END_TIMES, roomIndex); - } - - // #region Fill 39 - static void fill39TimeTable() { - int roomIndex = 2; - fillTable(new String[] { "Bd", "Bd", "Bd", "Bd", "Bd", "Lunch", "Lunch", "Lu", "Lu", "Lu", "Lu", "" }, - "Monday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Do", "Do", "Zu", "Zu", "Zu", "Lunch", "Lunch", "Se", "Se", "Se", "Se", "" }, - "Tuesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Cg", "Cg", "Cg", "Cg", "Bu", "Lunch", "Lunch", "Gi", "Gi", "Gi", "Gi", "" }, - "Wednesday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Bd", "Bd", "Bd", "Bd", "Or", "Lunch", "Lunch", "Le", "Le", "Le", "", "" }, - "Thursday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Gi", "Gi", "Gr", "Gr", "Gi", "Lunch", "Lunch", "Hi", "Hi", "Hi", "", "" }, - "Friday", START_TIMES, END_TIMES, roomIndex); - } - - static boolean isBreak(int intHour, int intMinute) { - // Check if the time is between 7 AM and 5 PM - if (intHour >= 7 && intHour <= 17) { - // Check if the time falls between any lesson start and end times - for (int i = 0; i < START_TIMES.length; i++) { - // Split the start and end times into hours and minutes - String[] startTime = START_TIMES[i].split(":"); - String[] endTime = END_TIMES[i].split(":"); - - int startHour = Integer.parseInt(startTime[0]); - int startMinute = Integer.parseInt(startTime[1]); - int endHour = Integer.parseInt(endTime[0]); - int endMinute = Integer.parseInt(endTime[1]); - - // Check if the given time is during the current lesson - if ((intHour > startHour || (intHour == startHour && intMinute >= startMinute)) && - (intHour < endHour || (intHour == endHour && intMinute < endMinute))) { - return false; // It's not a break, it's during a lesson - } - } - return true; // If no lessons match, it must be a break + static String whatBreakIsIt(int intHour, int intMinute) { + String whatBreak = ""; + for (int i = 0; i < END_TIMES.length; i++) { + String[] tempEnd = END_TIMES[i].split(":"); + String[] tempStart = START_TIMES[i].split(":"); + if (intHour >= Integer.parseInt(tempStart[0]) && intHour <= Integer.parseInt(tempEnd[0])) { + if (intMinute >= Integer.parseInt(tempStart[1]) + && intMinute <= Integer.parseInt(tempEnd[1])) { + if (Integer.parseInt(tempEnd[1]) - Integer.parseInt(tempStart[1]) == 5) { + whatBreak = "short"; + } else if (Integer.parseInt(tempEnd[1]) - Integer.parseInt(tempStart[1]) > 5) { + whatBreak = "long"; + } else { + whatBreak = "No Break"; + } } - return false; // Time is outside of the school hours (7 AM to 6 PM roughly) + } + } + return whatBreak; // If no break is found, return "No Break" + } + + static int[] whatTime(int intHour, int intMinute) { + int[] result = new int[2]; // [most recent end time, next start time] + result[0] = -1; // Initialize to -1 (no previous end time found) + result[1] = -1; // Initialize to -1 (no next start time found) + + for (int i = 0; i < END_TIMES.length; i++) { + // Parse END_TIMES[i] + String[] endParts = END_TIMES[i].split(":"); + int endHour = Integer.parseInt(endParts[0]); + int endMinute = Integer.parseInt(endParts[1]); + + // Parse START_TIMES[i] + String[] startParts = START_TIMES[i].split(":"); + int startHour = Integer.parseInt(startParts[0]); + int startMinute = Integer.parseInt(startParts[1]); + + // Check for the most recent end time + if ((intHour > endHour) || (intHour == endHour && intMinute >= endMinute)) { + result[0] = i; // Track the most recent lesson's end time index + } + + // Check for the next start time + if ((intHour < startHour) || (intHour == startHour && intMinute < startMinute)) { + result[1] = i; // Track the next lesson's start time index + break; // No need to continue since START_TIMES is sorted + } } - static String whatBreakIsIt(int intHour, int intMinute, int intDay) { - boolean isABreak = false; - for (int i = 0; i < END_TIMES.length; i++) { - - } - return "No Break"; // If no break is found, return "No Break" - } + return result; + } }