From e45d52037f964c58d1d03069baf6ac026228c46c Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Tue, 5 Nov 2024 14:52:41 +0100 Subject: [PATCH] Project work --- Code/Steiner/CO2-Daten-Projekt/bin/App.class | Bin 5668 -> 5710 bytes .../CO2-Daten-Projekt/bin/FillTable.class | Bin 2699 -> 3915 bytes .../CO2-Daten-Projekt/bin/Lesson.class | Bin 1206 -> 4112 bytes .../CO2-Daten-Projekt/bin/Teacher.class | Bin 1967 -> 1943 bytes Code/Steiner/CO2-Daten-Projekt/src/App.java | 80 +++++++------- Code/Steiner/CO2-Daten-Projekt/src/Data.java | 2 +- .../CO2-Daten-Projekt/src/FillTable.java | 55 ++++++---- .../Steiner/CO2-Daten-Projekt/src/Lesson.java | 99 ++++++++++++++++-- .../CO2-Daten-Projekt/src/Teacher.java | 17 +-- 9 files changed, 173 insertions(+), 80 deletions(-) diff --git a/Code/Steiner/CO2-Daten-Projekt/bin/App.class b/Code/Steiner/CO2-Daten-Projekt/bin/App.class index 985e89e39b279b956a55e3350ea88d3b97f0d04e..ca3f457cc1f81cdaec03b63fa8a05bb138571afa 100644 GIT binary patch literal 5710 zcmb_gd3+pI9sj=UW@oaUw&}D9P1?e=^hkOnZJ;SMDNxduE~H86rYWHuo$OANZ8kg0 z&TQLo3*`_M@IV3OsEQFqg;v4}QcqA3Z&4BT174u0cpq4e-#0Vc-L#dDf0#D&-n{pF zzvKJ6-sG8oKYj?n8gYt(3W3ntY*s;7pn8|N+iXsonSti+{#{nW6;PannaNl=f$5#z zZr)9$o8$gsn?Q6+clV}CJG!@a^$3WVz~l})eCIP)K#p`n4S!*KfHr))niCt?i6co9(_j zp0aT_m&y!~P<1UcF=*u+Dz?3|$A6LQ?TK_MlXB0Xu?>yA0^trjX(^}^n0Aa+RhWf2 z3T98hBR=A|*06>XagsnqDkD(iE0D6AW0`E;r4E)k+!n=5%+)XtCksT{1DP`$j!WCv zTLpmy8Y&S{P%U2?G)zUcg2fYsd-kbVO3`O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-v(mlE$zvfRzM+QS&?q`O`|bn|44Z{s^W zBX8c1lHfSf@-gCxzr?%k*;45DT%q@9Kk)h=dHqk=54%7Goe2awXgk$I$o!h@Lag{$<dNa0@I3*I+dZ1vW`&t)y$FC^3JZIme(-{UeDZj z0~5`S%zH=atv4Zzo9U&uFiYM#WDT%ZRJcW^0@Y%Q>z&dX1-^5bC(4yjP`)QTOD^&( zQ5P{{=uG$LMWytgLdGtn#pWX3s<^<-5=2MLdT`Nmx()`%ud`!5J2Sw;W= diff --git a/Code/Steiner/CO2-Daten-Projekt/bin/FillTable.class b/Code/Steiner/CO2-Daten-Projekt/bin/FillTable.class index 57bc825369d035a417b01f06151e01853a0538f6..bbcabff3c3961eff4636c2fd9c9e0f661551502f 100644 GIT binary patch literal 3915 zcmbVOYjayy6aZVygOi9zUDSpPb{ETcTwd0p;*-j(HK`~HdTeX$ik}Jz0 z4QZQ}0!@KJOH!b;r3n-lY938X92y$lFw^gRVTM1z7Y4q-l;_$*wOBnfkHGQ;Dgp0dFMQ zeJpxkG&Ir|F|cDIyfGz`%_LJZ9aQNX?aj}yJE!K7sbuz$0Y_!kxB=&p^fc9dMe4av zZEWTHwqSFMjdHT~U=x`lI~Z(ku(8vCtFa;2MEX9VjllrvE}?;7BWXpBwvgT?v`Gu> z5!xIKP;0NymS7|4KB29e-X*jx*wEsJfxCTh!L(7COMp_76oH856LqHmi!Sz=O& zp-|PhhiQj=7{V}Dok?VS;}3;W(}^<%{FR$!t3nn=3|P@bd}=n4@gR&b$^7VhOdogS z7@`*FH%Irvf)B?*AGx#1`TQPuCnhGs;l$!%I@Mv}!v@UUgGitBVFDlFa?EQqKA$kK zv$AS)QXZVZ$0UpU41_B~npyyz}`5f;}1zgOP!v@Y&?^VvN|T6 zNKNOMJCjb&uWhOkGGJ36|Cr>&wKcde;kA8b&$mRf@u>$!;tSd<9(XbDLkekrJ{w=0 zm6NECWyr>Z+_aH&imEbg(T6OSIFxvBDL%)1i~5+m3p%P!+V}()Jdv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_S%Le)`Tf+zg?NIbNn{xcz#;sD;3-N>b}=x*vicflb(jhao(|Zh=tFa5GNA7}raa zZV*o@i&{tJmzLZffW&6hQyK=u3N-!@5U~%bntIXx9u1K~#Quy%4I^rEB~o19lpq`XHoqDeGkuQ-PNnDx%t7F#h_bwY*;A9*X3-4G}ji>5>Rn|~6-{+r-A pUO@D#cR&{%)pP>U#=nMAP0~TX6C08Q){+De room39Data = Data.getData("https://api.thingspeak.com/channels/1521262/feeds.csv", - 39); - private static final List room38Data = Data.getData("https://api.thingspeak.com/channels/1364580/feeds.csv", - 38); - private static final List room37Data = Data.getData("https://api.thingspeak.com/channels/1521263/feeds.csv", - 37); + private static final int LESSON_COUNT = 12; // Updated to match the lengths of START_TIMES and END_TIMES // Time table public static final Lesson[][][] timeTable = new Lesson[ROOM_COUNT][DAY_COUNT][LESSON_COUNT]; // Teacher initials and array private static final String[] TEACHER_INITIALS = { - "Bä", "Bd", "Bu", "Cg", "Di", "Do", "Eh", "Es", "Fh", "Gi", - "Gr", "Hm", "Hi", "Kg", "Kh", "Lz", "Lu", "Or", "Re", "Se", - "Ts", "Vt", "Zu" + "Bd", "Bu", "Cg", "Do", "Eh", "Fh", "Gi", "Gr", "Hm", "Hi", + "Kg", "Kh", "Lz", "Lu", "Or", "Re", "Se", "Ts", "Vt", "Zu" }; + private static final Teacher[] teachers = new Teacher[TEACHER_INITIALS.length]; // Initialization of teachers @@ -45,14 +37,28 @@ public class App { // Calculate points based on criteria private static void calculatePoints() { - // TODO: Implement point calculation logic based on specific criteria. - // Example: If a teacher opens the window during a small break (entire break 5 - // points - can - // be reduced by the amount the window was open). - // Maximum points for a long break: 10 points. - // Plus 5 bonus points if the teachers are switching after. - for (Teacher teacher : teachers) { - teacher.setPoints(0); + for (int day = 0; day < DAY_COUNT; day++) { + for (int room = 0; room < ROOM_COUNT; room++) { + for (int lessonIndex = 0; lessonIndex < LESSON_COUNT - 1; lessonIndex++) { + Lesson currentLesson = timeTable[room][day][lessonIndex]; + Lesson nextLesson = timeTable[room][day][lessonIndex + 1]; + + // Ensure both current and next lessons are not null + if (currentLesson != null && nextLesson != null) { + // Calculate points for the current lesson based on the next lesson + int points = currentLesson.calculatePoints(nextLesson); + + // Update the points for the teacher associated with the current lesson + String currentTeacherName = currentLesson.getTeacherName(); + for (Teacher teacher : teachers) { + if (teacher.getName().equals(currentTeacherName)) { + teacher.addPoints(points); // Update teacher points + break; + } + } + } + } + } } } @@ -64,22 +70,20 @@ public class App { // Print the teachers and their points private static void printTeachers() { System.out.println("Teachers and their points:"); - - int rank = 1; // Start with rank 1 - int previousPoints = -1; // Track the points of the previous teacher - int currentRankCount = 0; // Count how many teachers share the same rank + int rank = 1; + int previousPoints = -1; + int currentRankCount = 0; for (Teacher teacher : teachers) { if (teacher.getPoints() != previousPoints) { - rank += currentRankCount; // Update rank if points are different - currentRankCount = 1; // Reset count for the new points + rank += currentRankCount; + currentRankCount = 1; } else { - currentRankCount++; // Increment count for same points + currentRankCount++; } - // Print the teacher with their rank and points System.out.printf("%d. %s - %d points%n", rank, teacher.getName(), teacher.getPoints()); - previousPoints = teacher.getPoints(); // Update previous points + previousPoints = teacher.getPoints(); } } @@ -88,17 +92,18 @@ public class App { System.out.println(textOutput); while (!scanner.hasNextInt()) { System.out.println("Invalid input. Please enter a number."); - scanner.next(); // Clear the invalid input + scanner.next(); } - return scanner.nextInt(); // Read user input + return scanner.nextInt(); } // Print explanation of point calculations private static void printExplanation() { System.out.println("Point calculation explanation:"); - System.out.println("1. 5 points for keeping the window open during a small break."); - System.out.println("2. Up to 10 points for long breaks, with deductions for window usage."); - System.out.println("3. Bonus points for switching teachers."); + System.out.println("1. Up to 5 points for keeping the window open during a small break."); + System.out.println( + "2. Up to 10 points for long breaks, depending on the duration the window is open and deductions for usage."); + System.out.println("3. Additional 5 bonus points for switching teachers if another teacher is in the room."); } // Print shutdown animation @@ -107,7 +112,7 @@ public class App { for (int i = 3; i > 0; i--) { System.out.print(i + "..."); try { - Thread.sleep(1000); // Sleep for 1 second + Thread.sleep(1000); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } @@ -131,10 +136,9 @@ public class App { } else if (userInput == 0) { printShutDown(); } else { - // Handle invalid input System.out.println("Invalid input. Please enter 1 for Yes or 0 for No."); } - scanner.close(); // Close the scanner to avoid resource leaks + scanner.close(); } } diff --git a/Code/Steiner/CO2-Daten-Projekt/src/Data.java b/Code/Steiner/CO2-Daten-Projekt/src/Data.java index 7e45e80..068a501 100644 --- a/Code/Steiner/CO2-Daten-Projekt/src/Data.java +++ b/Code/Steiner/CO2-Daten-Projekt/src/Data.java @@ -84,4 +84,4 @@ public class Data { return new Data(classRomNumber, co2Level, day, date); } -} +} \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt/src/FillTable.java b/Code/Steiner/CO2-Daten-Projekt/src/FillTable.java index 66b07cb..adf9696 100644 --- a/Code/Steiner/CO2-Daten-Projekt/src/FillTable.java +++ b/Code/Steiner/CO2-Daten-Projekt/src/FillTable.java @@ -1,6 +1,5 @@ + public class FillTable { - // Define start and end times as class variables - // #region Class Variables 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" @@ -11,14 +10,13 @@ public class FillTable { "14:20", "15:10", "16:10", "17:00", "17:50" }; - // #region fillTable - // Example method to fill a timetable with teachers - private static void fillTable(String[] teacherNames, String day, String[] startTime, String[] endTime, + private static void fillTable(String[] teacherShortNames, String day, String[] startTime, String[] endTime, int roomIndex) { int dayIndex = getDayIndex(day); - for (int i = 0; i < teacherNames.length; i++) { - // Room is determined by the caller method - App.timeTable[roomIndex][dayIndex][i] = new Lesson(37, teacherNames[i], startTime[i], endTime[i], 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); } } @@ -35,36 +33,49 @@ public class FillTable { case "Friday": return 4; default: - return -1; // Invalid day + return -1; } } - // Fill 37 timetable - // #region table 37 static void fill37TimeTable() { int roomIndex = 0; - fillTable(new String[] { "Hm", "Py", "Hi", "Hm", "Le", "", "Gi", "Gi", "D", "Ts", "Ts", "" }, + 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); } - // Fill Room 38 timetable - // #region table 38 static void fill38TimeTable() { int roomIndex = 1; - fillTable(new String[] { "Bz", "Bz", "Bz", "Bz", "Bz", "", "Hn", "Hn", "Bu", "Bu", "Hn", "Hn" }, + fillTable(new String[] { "Bz", "Bz", "Bz", "Bz", "Bz", "Lunch", "Lunch", "Hn", "Hn", "Bu", "Hn", "Hn" }, "Monday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "Br", "Kg", "Kh", "Re", "Es", "", "Bt", "EW", "FR", "FR", "VW", "VW" }, + 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); } - // Fill Room 39 timetable - // #region table 39 static void fill39TimeTable() { int roomIndex = 2; - fillTable(new String[] { "", "", "", "", "", "", "", "", "", "", "", "" }, + fillTable(new String[] { "Bd", "Bd", "Bd", "Bd", "Bd", "Lunch", "Lunch", "Lu", "Lu", "Lu", "Lu", "" }, "Monday", START_TIMES, END_TIMES, roomIndex); - fillTable(new String[] { "", "", "", "", "", "", "", "", "", "", "", "" }, + 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); } -} - +} \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt/src/Lesson.java b/Code/Steiner/CO2-Daten-Projekt/src/Lesson.java index 5990b7a..bb51798 100644 --- a/Code/Steiner/CO2-Daten-Projekt/src/Lesson.java +++ b/Code/Steiner/CO2-Daten-Projekt/src/Lesson.java @@ -1,3 +1,9 @@ +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeFormatterBuilder; +import java.time.temporal.ChronoField; +import java.util.List; + public class Lesson { private int room; private String teacherName; @@ -5,6 +11,20 @@ public class Lesson { private String endTime; private String day; + // CO2 level tracking + private List co2Levels; // Assuming this is provided during breaks + private static final int SMALL_BREAK_POINTS = 5; + private static final int BIG_BREAK_POINT_PER_MINUTE = 1; + + // Define a DateTimeFormatter that accepts both 'HH:mm' and 'H:mm' + private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder() + .appendPattern("H:mm") // Matches '8:30' + .optionalStart() + .appendPattern("HH:mm") // Matches '08:30' + .optionalEnd() + .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0) // Set default minutes to 0 if not provided + .toFormatter(); + // Constructor to initialize all fields public Lesson(int room, String teacherName, String startTime, String endTime, String day) { this.room = room; @@ -14,6 +34,7 @@ public class Lesson { this.day = day; } + // Getters public int getRoom() { return room; } @@ -34,20 +55,76 @@ public class Lesson { return day; } - public boolean isBreak() { - // Logic if it is between lessons - return false; + public boolean isBreak(Lesson nextLesson) { + LocalTime thisEndTime = LocalTime.parse(endTime, TIME_FORMATTER); + LocalTime nextStartTime = LocalTime.parse(nextLesson.getStartTime(), TIME_FORMATTER); + return thisEndTime.equals(nextStartTime); } - public boolean isBigBreak() { - // is the break longer than 5 minutes - // But was not the last lesson of the day - // Is not Lunch break - return false; + public boolean isBigBreak(Lesson nextLesson) { + LocalTime thisEndTime = LocalTime.parse(endTime, TIME_FORMATTER); + LocalTime nextStartTime = LocalTime.parse(nextLesson.getStartTime(), TIME_FORMATTER); + long breakDuration = java.time.Duration.between(thisEndTime, nextStartTime).toMinutes(); + boolean notLastLesson = !nextLesson.getEndTime().equals("17:00"); + boolean isLunchBreak = "Lunch".equals(nextLesson.getTeacherName()); + return breakDuration > 5 && notLastLesson && !isLunchBreak; } - public boolean isTeacherSwitch() { - // is a another teacher in this room - return false; + public boolean isTeacherSwitch(Lesson nextLesson) { + return room == nextLesson.getRoom() && !teacherName.equals(nextLesson.getTeacherName()); + } + + public void setCo2Levels(List co2Levels) { + this.co2Levels = co2Levels; + } + + public int calculatePoints(Lesson nextLesson) { + int points = 0; + + // Check for small break + if (isBreak(nextLesson)) { + points += calculateSmallBreakPoints(); + } + + // Check for long break + if (isBigBreak(nextLesson)) { + points += calculateBigBreakPoints(); + } + + // Check for teacher switch + if (isTeacherSwitch(nextLesson)) { + points += 5; // Additional 5 points for switching teachers + } + + return points; + } + + private int calculateSmallBreakPoints() { + if (co2Levels == null || co2Levels.size() < 5) + return 0; + + boolean continuousDecrease = true; + for (int i = 1; i < co2Levels.size(); i++) { + if (co2Levels.get(i) >= co2Levels.get(i - 1)) { + continuousDecrease = false; + break; + } + } + + return continuousDecrease ? SMALL_BREAK_POINTS : 0; + } + + private int calculateBigBreakPoints() { + if (co2Levels == null) + return 0; + + int points = 0; + for (int i = 1; i < co2Levels.size(); i++) { + if (co2Levels.get(i) < co2Levels.get(i - 1)) { + points += BIG_BREAK_POINT_PER_MINUTE; + } + } + + return points; } } \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt/src/Teacher.java b/Code/Steiner/CO2-Daten-Projekt/src/Teacher.java index 1331336..6311918 100644 --- a/Code/Steiner/CO2-Daten-Projekt/src/Teacher.java +++ b/Code/Steiner/CO2-Daten-Projekt/src/Teacher.java @@ -11,14 +11,11 @@ public class Teacher { // Static block to initialize the name mappings static { nameMap.put("Hm", "Hummel"); - nameMap.put("Bä", "Bäcker"); nameMap.put("Bd", "Bender"); nameMap.put("Bu", "Burger"); nameMap.put("Cg", "Chung"); - nameMap.put("Di", "Dimitrov"); nameMap.put("Do", "Doe"); nameMap.put("Eh", "Ehrlich"); - nameMap.put("Es", "Esposito"); nameMap.put("Fh", "Fischer"); nameMap.put("Gi", "Giordano"); nameMap.put("Gr", "Graham"); @@ -33,17 +30,17 @@ public class Teacher { nameMap.put("Ts", "Tanaka"); nameMap.put("Vt", "Vetter"); nameMap.put("Zu", "Zuniga"); - // Add more mappings as needed + // No additional mappings beyond those present in the timetable } // Constructor public Teacher(String name) { setName(name); - points = 0; + points = 0; // Initialize points to zero } public String getName() { - return name; + return name; // Return the full name of the teacher } public void setName(String name) { @@ -51,10 +48,14 @@ public class Teacher { } public int getPoints() { - return points; + return points; // Return the current points } public void setPoints(int points) { - this.points = points; + this.points = points; // Set the points to a specific value + } + + public void addPoints(int points) { + this.points += points; // Add points to the current total } }