From e192af464727e51746fb7c862264df9e3b8d5a56 Mon Sep 17 00:00:00 2001 From: Patrick_Pluto Date: Tue, 26 Nov 2024 11:47:06 +0100 Subject: [PATCH] fixed your code --- bin/App.class | Bin 7673 -> 7636 bytes bin/Break.class | Bin 2424 -> 938 bytes bin/BreakSchedule.class | Bin 1754 -> 2196 bytes bin/Co2Data.class | Bin 3726 -> 3760 bytes bin/Time.class | Bin 1347 -> 0 bytes src/App.java | 82 +++++++++++++++++----------------------- src/Break.java | 56 +++++++++------------------ src/BreakSchedule.java | 51 ++++++++++--------------- src/Co2Data.java | 23 ++++++----- src/Time.java | 37 ------------------ 10 files changed, 85 insertions(+), 164 deletions(-) delete mode 100644 bin/Time.class delete mode 100644 src/Time.java diff --git a/bin/App.class b/bin/App.class index d3fe19c9a0351c9b079e45bc4b1207358f2156de..01dfcb4ec29509833e3d70d12a3117804241298b 100644 GIT binary patch literal 7636 zcmcIpd3+q@d468)O0!yz4_1~zvTTn*7|FIyYy&zBmQNWS#w*Ln<{IserL|VO%kHd= zAV2^U2*iW{;VMZWO{1hC3CM{oY;Z~1^hnbyz0x+lk{;>Z^bUb2&-cx&v@+_if7L(O z`Q|&``+eT`8-4R9=Pu07VyC=dphOVZk;xbc3RWDqPuNXKJ2leOKYZMYxdI~>vr{Q2 zE2!wvt9dt(Y>Il5?Shc&*s)P3n-heO_6&G0oHq~l_xIl3cc`~(_ra*32`bk~l7 z-F&Gy>XFinqHZ>k8c`>r`}z+K+}?F?_l_I6sj`UOj%?PR=t<;UZYz%_MpCw$&pLv2 zi|y$++S8SF?6LOk+`Xiyzi;mx%}_@ynMftv?bNxheozqHnT|UKRtYY7pK|564Almz z7MLYEk#n7K6RS}}r4p$*ITPuo?o=l4QXR)0Zx5pqYfY?!B`E9gd0tlM$$Qb>`oVGt zE;mt%vU1d7gMlk)c;A*Lu0kDOQ}(#iYi9(@i`x0!#W&@i9OXqdqf{6w+QpH^2 zZkmevb}Kf`CJclExO7`OfR*2lt5HfVY&B7i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-XdjnIEW@iAVU7G;lj?_|XWw<(BTVA=qwA zPOFl|SNO)j*8;;~1`n!De2ec0zpY=`%)w|s_2aRMeUQoue)yG2cB%-RYB9O`&l&c#DK-V+^?(U?7BOu6mcf%p;#hSl+jWfUtu87l|#8-rXxyo_lt=Q7{m2ZG~o$1L!zqkx^ z1Wx?_RXzB_B;X_&l;CI@;19=mxZ@D#*Pw>HjPbg_MpVu^@ec4E-C(a9<$D z`vd99Q3Pb1?vDKj5SnbQBCrpCGBh>KlFTr#r&;|x=275ZfP4t(YUB!KROpgU@gc5+`K~a# zqs&_ZmvD`;1m73%5qC*inZ(E3r3m~w{{e}r@hde3Z7k((yu__)uFCc9?+}mX=3iiK zEqA}1%zb_#HJX}8F1*BgIsFSBOr-blc)xI`$RVIeP$igHBu|#<>MTx#fG<#TF@$|P zas-Jj-cMsLE~v>cBaV&Xco;w;EU^wMNh`x)peY7Fh#F;ShE=D90Vr(qJHoTga9Ulf Pi>K7+!RsNwE++l~T{i_z diff --git a/bin/BreakSchedule.class b/bin/BreakSchedule.class index 17a59e2b63e32025f9d8600040e6cdc065152405..a590c5921789350900cbaa74c8393d545f0db2c6 100644 GIT binary patch literal 2196 zcmaJ>U2_v<6n@@jvzw#~G=%~I#e$%1fkse^l2T~{g+Q7hiNz2Vw#nKqO?NxVh7m_+ zywD40m_eO!M7hGjVVrRsKSmf(7_a>S-gxgn;L6eZyzi!MB8>UibKbM(Ip6R3?Vr2% zmzI!*YoJSD%|zX{<_ncMyV|VT1~h@53)V#|S+m^PWPav?UGW9th2r?>;<>`qcs6@( z;`Gt+lLB4kjKI31xg(w8oC!Knl#%Ngyne2Q+3Dn3qA|Fkm?1HGBJun0-F}Bc{}a7 z70W;4_;chMzUBHX_ojhNCezAGMMbpZ&N8Z(FmB+mz96K8gn=N2 zb`yisvNT6cOyU@I=d4CfRe`CUjiDbIITdPJ#lBQICLF01@9c8tJYQN|p6RXsaoIj* zyv+sQs?1MWi|Pg#IK?Yuph$lOuUW6yla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qF^2vKzu=L?MdH_?Cii3UpM_oiSZ~Rku}q z8{Z+sUMFyG7l|vSpHcAL%HZ(^UdAXC^RjjHY0EBXoQ2Kysg#XLcU!>MZ!&3mg~5-R`lmT^Z5;~DR_+uRKYaN4QpLb z`e^whcUsH3mc1$asVs20wgm%i-(gBKb9vo4p0=#@QgLi=Ics+63>QeS2I{qdH0brf z#iW+cXAA<|-hx*nc%2wcYs^2_KiZ#KSeWadvTe)m&+^LQj)-8Jli%Mn%zoLA{VTeg zUE>#nC;lDD;frN;x$Eo5Vo^?1XLv{3lX=Z?bVtEk0=Ml!uMr*!{vdGlzpJuKeem#3 zvZaYPV2J~>Hy3xZosUeRM-bx-6;`$aG430_iSIU})UPJp;E<%vbeS;p)q3SCH4v8@i z1;*pl4oPhr3d`#_1*bc7uNeU<(hwxsBA)HqOY+^cLo}kQoj4hRayI za0Lf@o3G>1(U#tpKSNFQw!Dt_hj77@E{!(-<>o(Vl)Hk?*;lbTd>w@waDXy45?2{_ z1kd7=c#0g5MLR%L;6Bp)>591mBM({kfKFU)&VB=%>IFahbMOr;a#x3%kPcW7+ zJ$KW~Geqxc;^(jUU4c)Nk1c#}$7k?a+J25cCAECNpXcfe+)1GMZA>V5LcxH7?kC%SI(;1HJ-LMV8uoxQ?OBpS+o`8$u6-IN-NeX)$^(}|{&WqfTm5tcvK@s06q zytov5X$vn)>{-I^k2Y^ZEcG@Y*}{*nrU`GtgZC#Myh6eYeqi52c$++U2Rt}tnA91j z^9Wn$9BDPjkmsqDA&3i@#(59Alt-Nue(FKTMDR2GoF3aSh*!85qV-YgMCkh%z5fEg zWc&$cBAd0DzB)XZd{Eep8%&tGzhX=wT!rklF1~Nk=XLLS!+ZV~Z%`s<$eZ{*{)pax E1E$Z2IRF3v diff --git a/bin/Time.class b/bin/Time.class deleted file mode 100644 index 92abf032188bff636bd820e21052a44a39b50423..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1347 zcmZ`(+fEZv6kVsCc4!$&S^0ZW?9+2`!bT6^uC{`vd!_t6oS@I*&IKwGyeQimoG-!=El zT-mfsxz){Gx#iNiQ*Af`q972iSa!peH0CYaau)?cnL=S=gF#ExZ5c%nhJiM82m~_| z8xaU}8VDh*tV;%TWp$%hN6#6kwKsKFRtzN2$INPjsJ%sxiB-)#cP!goa~)|`@@*Ip z7+N;1vfNI))wE(^nPuy(OuIWWt(ZoU#E_1ZKzEA@28J;rpx0EYpy)db%WAPWni`38|@^jjN_W7jagqJcxanpzqs+YZ{ITfYfY_l8|u*e(# fG4KEn2^M3N+Mxi?7~jL* SHORT_BREAKS = new ArrayList(); + private static ArrayList LONG_BREAKS = new ArrayList(); // #region Initialization - public static String generateLink(int channelNumber, String date, String startTime, String endTime) { + public static URL generateLink(int channelNumber, String date) throws MalformedURLException { String baseUrl = "https://api.thingspeak.com/channels/"; - String formattedStartDateTime = date + " " + startTime; - String formattedEndDateTime = date + " " + endTime; + String formattedStartDateTime = date + " 07:00:00"; + String formattedEndDateTime = date + " 19:00:00"; - return baseUrl + channelNumber + "/feeds.csv?start=" + formattedStartDateTime.replace(" ", "%20") - + "&end=" + formattedEndDateTime.replace(" ", "%20"); // %20 --> " " + return new URL(baseUrl + channelNumber + "/feeds.csv?start=" + formattedStartDateTime.replace(" ", "%20") + + "&end=" + formattedEndDateTime.replace(" ", "%20")); // %20 --> " " } - private static double getDataAverageForMinute(int minute, int hour, int number, String date) { - // get the url - String startTime = ""; - if (hour < 10) { - startTime += "0"; - } - startTime += String.valueOf(hour); - startTime += ":"; - if (minute < 10) { - startTime += "0"; - } - startTime += String.valueOf(minute); - String calcStarttime = startTime + ":00"; - String calcEndTime = startTime + "59"; - - String url = generateLink(number, date, calcStarttime, calcEndTime); - - double averageCO2 = 0.0; - List co2DataList = Co2Data.getData(url); - for (Co2Data co2Data : co2DataList) { - averageCO2 += co2Data.getCo2Level(); - } - - return averageCO2 / co2DataList.size(); // Example CO2 average level - } - - private static void calculateBreakPoints(double[] minuteData, Break calcBreak, Teacher teacher) { - int duration = calcBreak.getEnd().getMinute() - calcBreak.getStart().getMinute(); + private static void calculateBreakPoints(Break calcBreak, Teacher teacher) { + int duration = calcBreak.getEnd() - calcBreak.getStart(); + Co2Data[] minuteData = calcBreak.getCo2Datas(); int breakPoints = minuteData.length; if (duration == minuteData.length) { for (int i = 0; i < duration; i++) { - if (minuteData[i] < minuteData[i + 1]) { + if (i + 1 != duration && (minuteData[i].getCo2Level() < minuteData[i + 1].getCo2Level())) { breakPoints--; } } @@ -86,7 +64,6 @@ public class App { } } - // #region User Interaction private static int getUserInput(String textOutput) { System.out.println(textOutput); @@ -102,7 +79,7 @@ public class App { private static void printExplanation() { 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("2. Up to 15-20 points for long pauses, depending on window usage."); System.out.println("3. 5 bonus points for teacher switches in classrooms."); } @@ -164,23 +141,32 @@ public class App { } // #region Main - public static void main(String[] args) { + public static void main(String[] args) throws MalformedURLException { System.out.println("Calculations in process please do not shut off..."); initializeTeachers(); - sortTeachers(); - printTeachers(); + + ArrayList co2Datas = new ArrayList(); for (int classrooms = 0; classrooms < 3; classrooms++) { for (int weekday = 0; weekday < 5; weekday++) { - // get the url and data - // calculate points + List tempData = Co2Data.getData(generateLink(ROOM_NUMBERS[classrooms], DATES[weekday])); + SHORT_BREAKS.add(BreakSchedule.createBreaks(BreakSchedule.START_SMALL_BREAK, + BreakSchedule.END_SMALL_BREAK, tempData)); + LONG_BREAKS.add(BreakSchedule.createBreaks(BreakSchedule.START_LONG_BREAK, + BreakSchedule.END_LONG_BREAK, tempData)); } } + + calculateBreakPoints(SHORT_BREAKS.get(0)[0], teachers[0]); + // Loop threw each day with a specific classroom and after the weekdays are over // go to the next of the 3 classroms // go threw every break calculate the point and give them to the teacher // directly // remember the point class - // breakShedule needed + // BreakSchedule needed + + sortTeachers(); + printTeachers(); while (true) { int userInput = getUserInput( diff --git a/src/Break.java b/src/Break.java index a646d36..2e182f0 100644 --- a/src/Break.java +++ b/src/Break.java @@ -1,56 +1,36 @@ public class Break { - private Time start; - private Time end; + private int start; + private int end; + private Co2Data co2Datas[]; - public Break(Time start, Time end) { - this.start = start; - this.end = end; - } - - public Time getStart() { + public int getStart() { return start; } - public void setStart(Time start) { + public void setStart(int start) { this.start = start; } - public Time getEnd() { + public int getEnd() { return end; } - public void setEnd(Time end) { + public void setEnd(int end) { this.end = end; } - /** - * Generates a Thingspeak API link based on channel number, date, and break - * period. - * - * @param channelNumber The Thingspeak channel number. - * @param date The date in format "YYYY-MM-DD". - * @param breakPeriod The Break object containing start and end times. - * @return A formatted URL for fetching data from the Thingspeak API. - */ - public static String generateLink(int channelNumber, String date, Break breakPeriod) { - String baseUrl = "https://api.thingspeak.com/channels/"; - String formattedStartDateTime = date + " " + breakPeriod.getStart().toString(); - String formattedEndDateTime = date + " " + breakPeriod.getEnd().toString(); - - return baseUrl + channelNumber + "/feeds.csv?start=" + formattedStartDateTime.replace(" ", "%20") - + "&end=" + formattedEndDateTime.replace(" ", "%20"); + public Co2Data[] getCo2Datas() { + return co2Datas; } - public static void main(String[] args) { - // Example usage - Time start = Time.valueOf("00:00:00"); - Time end = Time.valueOf("23:59:59"); - Break breakPeriod = new Break(start, end); - - String date = "2024-11-17"; - int channelNumber = 1364580; - - String link = Break.generateLink(channelNumber, date, breakPeriod); - System.out.println(link); + public void setCo2Datas(Co2Data[] co2Datas) { + this.co2Datas = co2Datas; } + + public Break(int start, int end, Co2Data[] co2Datas) { + this.start = start; + this.end = end; + this.co2Datas = co2Datas; + } + } diff --git a/src/BreakSchedule.java b/src/BreakSchedule.java index 165913b..7fc7b50 100644 --- a/src/BreakSchedule.java +++ b/src/BreakSchedule.java @@ -1,47 +1,34 @@ +import java.util.List; + public class BreakSchedule { - private static final String[] START_SMALL_BREAK = { - "8:30", "10:25", "11:15", "12:05", "13:30", "14:20", "16:10", "17:00", "17:50" + public static final int[] START_SMALL_BREAK = { + 830, 1025, 1115, 1205, 1330, 1420, 1610, 1700, 1750 }; - private static final String[] END_SMALL_BREAK = { - "8:35", "10:30", "11:20", "12:10", "13:35", "14:25", "16:15", "17:05", "17:55" + public static final int[] END_SMALL_BREAK = { + 835, 1030, 1120, 1210, 1335, 1425, 1615, 1705, 1755 }; - private static final String[] START_LONG_BREAK = { - "9:20", "15:10" + public static final int[] START_LONG_BREAK = { + 920, 1510 }; - private static final String[] END_LONG_BREAK = { - "9:40", "15:25" + public static final int[] END_LONG_BREAK = { + 940, 1525 }; - private static final Break[] SMALL_BREAKS; - private static final Break[] LONG_BREAKS; - - static { - SMALL_BREAKS = createBreaks(START_SMALL_BREAK, END_SMALL_BREAK); - LONG_BREAKS = createBreaks(START_LONG_BREAK, END_LONG_BREAK); - } - - private static Break[] createBreaks(String[] startTimes, String[] endTimes) { + public static Break[] createBreaks(int[] startTimes, int[] endTimes, List co2Data) { Break[] breaks = new Break[startTimes.length]; for (int i = 0; i < startTimes.length; i++) { - // Append ":00" to include seconds - String startTimeWithSeconds = startTimes[i]; - String endTimeWithSeconds = endTimes[i]; - - Time start = Time.valueOf(startTimeWithSeconds); - Time end = Time.valueOf(endTimeWithSeconds); - breaks[i] = new Break(start, end); + Co2Data[] co2Datas = new Co2Data[endTimes[i] - startTimes[i]]; + for (Co2Data data : co2Data) { + if (data.getTime() >= startTimes[i] && data.getTime() < endTimes[i]) { + System.out.println(startTimes[i] + " " + endTimes[i] + " " + data.getTime()); + co2Datas[data.getTime() - startTimes[i]] = data; + } + } + breaks[i] = new Break(startTimes[i], endTimes[i], co2Datas); } return breaks; } - - public static Break[] getSmallBreaks() { - return SMALL_BREAKS; - } - - public static Break[] getLongBreaks() { - return LONG_BREAKS; - } } \ No newline at end of file diff --git a/src/Co2Data.java b/src/Co2Data.java index 3b6a03b..fd8154d 100644 --- a/src/Co2Data.java +++ b/src/Co2Data.java @@ -2,19 +2,19 @@ import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; -import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class Co2Data { private Date date; + private int time; private int co2Level; // Constructor public Co2Data(Date date, int co2Level) { this.date = date; this.co2Level = co2Level; + this.time = date.getHour() * 100 + date.getMinute(); } // Getters and Setters @@ -34,12 +34,19 @@ public class Co2Data { this.co2Level = co2Level; } + public int getTime() { + return time; + } + + public void setTime(int time) { + this.time = time; + } + // Fetch and parse data from a CSV URL - public static List getData(String csvURL) { + public static List getData(URL url) { List dataList = new ArrayList<>(); try { - URL url = new URL(csvURL); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setRequestProperty("Accept", "text/csv"); @@ -52,6 +59,7 @@ public class Co2Data { br.readLine(); // Skip header line String output; + System.out.println(url); while ((output = br.readLine()) != null) { Co2Data data = parseData(output); if (data != null) { @@ -73,11 +81,7 @@ public class Co2Data { String[] parts = line.split(","); String dateStr = parts[0].trim(); // assuming date is in the first column int co2Level = Integer.parseInt(parts[1].trim()); // assuming CO2 level is in the second column - - // Convert the date string into a Date object (assumes CSV date format is - // yyyy-MM-dd HH:mm:ss) - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - Date date = sdf.parse(dateStr); + Date date = new Date(dateStr); return new Co2Data(date, co2Level); } catch (Exception e) { @@ -85,4 +89,5 @@ public class Co2Data { return null; } } + } diff --git a/src/Time.java b/src/Time.java deleted file mode 100644 index 62eee0e..0000000 --- a/src/Time.java +++ /dev/null @@ -1,37 +0,0 @@ -public class Time { - private int hour; - private int minute; - - public Time(int hour, int minute) { - if (hour >= 1 && hour <= 24 && minute >= 1 && minute <= 60) { - this.hour = hour; - this.minute = minute; - } else { - System.out.println("Failed to initialize the hour"); - } - } - - public int getHour() { - return hour; - } - - public void setHour(int hour) { - this.hour = hour; - } - - public int getMinute() { - return minute; - } - - public void setMinute(int minute) { - this.minute = minute; - } - - public static Time valueOf(String time) { - String[] parts = time.split(":"); - int hour = Integer.parseInt(parts[0]); - int minute = Integer.parseInt(parts[1]); - Time returnValue = new Time(hour, minute); - return returnValue; - } -}