From 1464df11cfa8debfef5a7d7b006f1cb6dcd710c3 Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Wed, 6 Nov 2024 15:41:49 +0100 Subject: [PATCH] Smaller task & refactoring co2 --- .../.vscode/settings.json | 7 ++ Code/Steiner/CO2-Daten-Projekt-V2/README.md | 18 +++ .../CO2-Daten-Projekt-V2/bin/App.class | Bin 0 -> 4990 bytes .../CO2-Daten-Projekt-V2/bin/Co2Data.class | Bin 0 -> 3958 bytes .../CO2-Daten-Projekt-V2/bin/Date.class | Bin 0 -> 1192 bytes .../CO2-Daten-Projekt-V2/bin/FillTable.class | Bin 0 -> 3915 bytes .../CO2-Daten-Projekt-V2/bin/Lesson.class | Bin 0 -> 1036 bytes .../CO2-Daten-Projekt-V2/bin/Points.class | Bin 0 -> 969 bytes .../CO2-Daten-Projekt-V2/bin/Teacher.class | Bin 0 -> 1710 bytes .../Steiner/CO2-Daten-Projekt-V2/src/App.java | 112 ++++++++++++++++++ .../CO2-Daten-Projekt-V2/src/Co2Data.java | 98 +++++++++++++++ .../CO2-Daten-Projekt-V2/src/Date.java | 41 +++++++ .../CO2-Daten-Projekt-V2/src/FillTable.java | 81 +++++++++++++ .../CO2-Daten-Projekt-V2/src/Lesson.java | 37 ++++++ .../CO2-Daten-Projekt-V2/src/Points.java | 35 ++++++ .../CO2-Daten-Projekt-V2/src/Teacher.java | 44 +++++++ Code/Steiner/arrayList/.vscode/settings.json | 7 ++ Code/Steiner/arrayList/README.md | 18 +++ Code/Steiner/arrayList/bin/App.class | Bin 0 -> 3684 bytes Code/Steiner/arrayList/src/App.class | Bin 0 -> 2997 bytes Code/Steiner/arrayList/src/App.java | 71 +++++++++++ .../.vscode/settings.json | 7 ++ Code/Steiner/repetition-classes-oop/README.md | 18 +++ .../repetition-classes-oop/bin/App.class | Bin 0 -> 1893 bytes .../repetition-classes-oop/bin/Teacher.class | Bin 0 -> 1336 bytes .../repetition-classes-oop/src/App.class | Bin 0 -> 1650 bytes .../repetition-classes-oop/src/App.java | 28 +++++ .../repetition-classes-oop/src/Teacher.class | Bin 0 -> 1054 bytes .../repetition-classes-oop/src/Teacher.java | 61 ++++++++++ 29 files changed, 683 insertions(+) create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/.vscode/settings.json create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/README.md create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/App.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/Co2Data.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/Date.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/FillTable.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/Lesson.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/Points.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/bin/Teacher.class create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/App.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/Co2Data.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/Lesson.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/Points.java create mode 100644 Code/Steiner/CO2-Daten-Projekt-V2/src/Teacher.java create mode 100644 Code/Steiner/arrayList/.vscode/settings.json create mode 100644 Code/Steiner/arrayList/README.md create mode 100644 Code/Steiner/arrayList/bin/App.class create mode 100644 Code/Steiner/arrayList/src/App.class create mode 100644 Code/Steiner/arrayList/src/App.java create mode 100644 Code/Steiner/repetition-classes-oop/.vscode/settings.json create mode 100644 Code/Steiner/repetition-classes-oop/README.md create mode 100644 Code/Steiner/repetition-classes-oop/bin/App.class create mode 100644 Code/Steiner/repetition-classes-oop/bin/Teacher.class create mode 100644 Code/Steiner/repetition-classes-oop/src/App.class create mode 100644 Code/Steiner/repetition-classes-oop/src/App.java create mode 100644 Code/Steiner/repetition-classes-oop/src/Teacher.class create mode 100644 Code/Steiner/repetition-classes-oop/src/Teacher.java diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/.vscode/settings.json b/Code/Steiner/CO2-Daten-Projekt-V2/.vscode/settings.json new file mode 100644 index 0000000..e112a70 --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "java.project.sourcePaths": ["src"], + "java.project.outputPath": "bin", + "java.project.referencedLibraries": [ + "lib/**/*.jar" + ] +} diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/README.md b/Code/Steiner/CO2-Daten-Projekt-V2/README.md new file mode 100644 index 0000000..7c03a53 --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/README.md @@ -0,0 +1,18 @@ +## Getting Started + +Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. + +## Folder Structure + +The workspace contains two folders by default, where: + +- `src`: the folder to maintain sources +- `lib`: the folder to maintain dependencies + +Meanwhile, the compiled output files will be generated in the `bin` folder by default. + +> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. + +## Dependency Management + +The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/App.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/App.class new file mode 100644 index 0000000000000000000000000000000000000000..52e0619dc7d1dc596132a76c296a3dd4d5c786a3 GIT binary patch literal 4990 zcmb_fd3+S*8GgQGH?!Fc64xX`ATmLeUBD!O3c3M=0J0boG$9mGak4ukOExp>%q$_= zyV(0a)mE#$(!(CYudrfkZL2-3z3*Gw+S>a*Y}NGnW@fV!L4WF<{Qzz~PuujZTP$N*gu~<|P5okQ1AJjVwx;fI>KYYN*x&n%m)lJi|1(*p4;`ulh6>*?RsHz*)70&{vS({Xjv9nuRWqn2)J1?o3%+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J_wzf&-|?f?J) literal 0 HcmV?d00001 diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Co2Data.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Co2Data.class new file mode 100644 index 0000000000000000000000000000000000000000..428ebccb594896bb45282e55cef7b8227bc76842 GIT binary patch literal 3958 zcma)9`F9&v75+xsjODRi%aIc~A$4gM%dw->rD3m{&nTmj zsR>Y)HifbjT1vuNNCRPMz%7lP#*mh+Ed_qyU*MnM91bVtdov@;8yu{2X5QR)-@V`a z?(&}ByL0O{fFt;ujDQ5W%W8XAb2J$t33r{-=Co8!GpAA~CeG;@M?xs8Il6>Mno4?y z1SMm&rS&;ICqe3?{IFpf&QS@`CQqX;Im$&{R#uN9h$RHOsP4lMCFpsY%$~lrEDoqJ{+~66SGI7pL&h!%b*>-RW~Xgy^TKcx_o7P1UJ0r@YwAvFWH24Y9wY^& z%@X39I7^NSjTRNH*e{{l%IjvAWtt46VVM#d$kS?b85B zd^m~}KBVFS0pTuEIH;d5>IJ7?cc!hZf(MxrotccDcN83AbhUgwXJjyv!IK_lX0xH7dMp$i>71D z>c^iDum~i^^nX~zadb=AI;+iakx7VShBM7k!O={IsTOBOZ1fyOCz3LlKM9vC!%Fp; z`J%%N(Y4t@UCZjW!1kz$H2N6>Vq2v^hou;-UD**uFHVTio|Lf7Ct;mRa#Y5kg!+=> zW5vly-PW@uuct6942&?P$_Bj24#C(djH&o2##t}~n-zs8VM_^*OO>DKQ5NW9Dn5pf zGr{wkUC>2~kg#);=#ZsSO;+Lz*htQD+b+hHI#Dr!4D(0JX4fUI*Je7Brv+)cib>He zqFJMm@$$9;(>N!?Sks$^<_nHKt6~Q1LP4v@HWl|mMaE9DRQ+&}R1F{?Na zn@wa+%N6w#lM?o<-dhRQ#sr9w8b>5gaorN1x=nND6PTCrM5)x*f>iNIQA=`O;Le#c zK2_3lBeIgUEG!lfi&At*m)_M8V-;j_TA?s#S+ia@Wt7>vHPKDDeQ(7|K-jo~MVstZ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FYt(75iRxUQgyp@X&QTU=WEb&}r2Ji{Qxcn5?KFw@d<|{DYE#8*-cQ43^ z6-LWf)V(Qt<93#qVq{Y-ILEpSa22nxK6)K-6blw=Nx%*e=$2#iCAFDa9(EtDd literal 0 HcmV?d00001 diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/FillTable.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/FillTable.class new file mode 100644 index 0000000000000000000000000000000000000000..bbcabff3c3961eff4636c2fd9c9e0f661551502f 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}()Jdv1AB^LRm4c25u zm)0IW$z`ImOPSoOhpE<|N$R?{i5HvNq%xhEjq?V|2Ip-&E-`8237&}XQfg|}#%DOx zGi~EZ#sR*1iZQxq{8_zQK^Sg`kykz4!#v?N}zRDQk`{x;Z z;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^Z4_QbQ~k;pt@TXKV|g7M z(Q1K@UxXnU5E+s{TIoNnbe~pwXDyLoVTt7M4gc$(I?su z<$X9$kZ3IOUDpGri8r4qRWSaDuxz;DFgW~N;L literal 0 HcmV?d00001 diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Points.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Points.class new file mode 100644 index 0000000000000000000000000000000000000000..3b1587076bb8ea5b35d83a81479ebbffb707a286 GIT binary patch literal 969 zcmZ{h%TB^j5QhI#kZT20yr7_>8)PAC<7J@<2?<^jjcW=X@nCI}Qg|viCK?kLK7bEp zoN23IQx=^$XZp{~cV@o6KRy8*V>by+AaP|Y%N-^W7bpyjvC%LMtKYcn4rI?2$lt56 zJXhApm8Xt09tA{8AZyxIUphe~+qJFH(62)UkCdg{6MY(#^U!XQOzw>$%c2g@MkNRUbxWGxb8D;lH{1}PIrWd;aumO-}vKn`eXyw`l4 YRzqK@L#EORBUPu6@_!qydaK;|0gy<5kpKVy literal 0 HcmV?d00001 diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/bin/Teacher.class b/Code/Steiner/CO2-Daten-Projekt-V2/bin/Teacher.class new file mode 100644 index 0000000000000000000000000000000000000000..f42ed1f5293c2d47e2897cb1d38c3c4718fc04a5 GIT binary patch literal 1710 zcmZux+jbO16x}tGWGX|GONE51KmuYiC=nG!6C&n1njwRkFhIO^CPhytGd;1>%_WMc zczN*$`~ja;WU-L7Tt2&&Kj07e13tUl)ia9<#+T~a`_wu6)Twj&_kVu*6~H-slR-)# zv!vZhRfie03G}SF*WJ;Y8+fC|l{H<71lj_(t_4)Vno3dV2i}-K$40{sqD=u=xR~t7 zWz6{t?uI~j(EV$w6P#+S z>I`}XdXp3ry}Y|wrDhgA=yR|KT}*a7aqEP@fP+qCCH4uV@^y&=wC3Y_UDtNu5DsVX zl)!EqjDZ{+!BHx1#4O3#;cclk>om5L8QDom3{i1%RpK}mCv~u@Lx~fHizS8)7l)qV za^$8wiDw1cr>b$l?I}{z4TU951%SQ-wI-wfS7BA|kf-7W}Xj!G>k{h_|bi78c97$Bkm30)Eo34>treuxWavb=c zYx>X+^g>);(czN2QcIe-QE_W!H}nl|k^S3WwbkMyX4M>&EVj^ROrJW)K=PhZ)#o5}7Fy$I zCW*lplHuDkyuFzok6$MbG{XsGdF1g7W=oAYtms+aT-IqtJY^ahgVaoO{L@I8oVZJw z1o+)=W`fpT3Fn}V>~3_C=?28z#0#SP5qhpZfVzkNpU|)Ns{IdfFpbLw460)mJguIw zU__m?;5jvF!D;oP1!vSN7QCv)EI6lLx8MymWx#-#EKr<5a`iyqQOj<)w z>2rM1(i`Ph(AJ*&88?66CIxftj)XjsgmIb&T44n4;!85@9&C5M{a@$Y|2lt_NPPV- Dxe!!r literal 0 HcmV?d00001 diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java new file mode 100644 index 0000000..8a24371 --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/App.java @@ -0,0 +1,112 @@ +import java.util.Arrays; +import java.util.Scanner; + +public class App { + private static final Scanner scanner = new Scanner(System.in); + + private static final int ROOM_COUNT = 3; + private static final int DAY_COUNT = 5; + private static final int LESSON_COUNT = 12; + + public static final Lesson[][][] timeTable = new Lesson[ROOM_COUNT][DAY_COUNT][LESSON_COUNT]; + private static final Teacher[] teachers = new Teacher[Teacher.nameMap.size()]; + + private static void initializeTeachers() { + int index = 0; + for (String initial : Teacher.nameMap.keySet()) { + teachers[index++] = new Teacher(initial); + } + } + + private static void fillInTimeTable() { + FillTable.fill37TimeTable(); + FillTable.fill38TimeTable(); + FillTable.fill39TimeTable(); + } + + private static void calculatePoints() { + // Point calculation logic + } + + private static void sortTeachers() { + Arrays.sort(teachers, + (a, b) -> Integer.compare(b.getPoints().getTotalPoints(), a.getPoints().getTotalPoints())); + } + + private static void printTeachers() { + int rank = 1; + int previousPoints = -1; + int currentRank = 1; + + for (int i = 0; i < teachers.length; i++) { + Teacher teacher = teachers[i]; + int teacherPoints = teacher.getPoints().getTotalPoints(); + + if (teacherPoints == previousPoints) { + System.out.println(currentRank + ". " + teacher.getName() + " " + teacherPoints); + } else { + if (i > 0) { + rank += (i - (currentRank - 1)); + } + currentRank = rank; + System.out.println(rank + ". " + teacher.getName() + " " + teacherPoints); + } + + previousPoints = teacherPoints; + } + } + + private static int getUserInput(String textOutput) { + System.out.println(textOutput); + while (true) { + if (scanner.hasNextInt()) { + return scanner.nextInt(); + } else { + System.out.println("Invalid input. Please enter a number."); + scanner.next(); + } + } + } + + 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 break."); + System.out.println("2. Up to 10 points for long breaks, depending on window usage."); + System.out.println("3. 5 bonus points for teacher switches in the room."); + } + + private static void printShutDown() { + System.out.println("Shutting down..."); + for (int i = 3; i > 0; i--) { + System.out.print(i + "..."); + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + System.out.println("Goodbye!"); + } + + public static void main(String[] args) { + fillInTimeTable(); + initializeTeachers(); + calculatePoints(); + sortTeachers(); + printTeachers(); + + int userInput = getUserInput( + "Do you want to see how the points were calculated? (Yes 1, No 0; anything is an error)"); + + if (userInput == 1) { + printExplanation(); + printShutDown(); + } else if (userInput == 0) { + printShutDown(); + } else { + System.out.println("Invalid input. Please enter 1 for Yes or 0 for No."); + } + + scanner.close(); + } +} diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Co2Data.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Co2Data.java new file mode 100644 index 0000000..33c649f --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Co2Data.java @@ -0,0 +1,98 @@ +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + +public class Co2Data { + private Date date; + private int co2Level; + + public Co2Data(Date date, int co2Level) { + this.date = date; + this.co2Level = co2Level; + } + + public Date getDate() { + return date; + } + + public void setDate(Date date) { + this.date = date; + } + + public int getCo2Level() { + return co2Level; + } + + public void setCo2Level(int co2Level) { + this.co2Level = co2Level; + } + + public static List getData(String csvURL, int classRoomNumber) { + List dataList = new ArrayList<>(); + + try { + URL url = new URL(csvURL); + HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setRequestProperty("Accept", "application/csv"); + if (conn.getResponseCode() != 200) { + throw new RuntimeException("Failed : HTTP Error code : " + + conn.getResponseCode()); + } + + InputStreamReader in = new InputStreamReader(conn.getInputStream()); + BufferedReader br = new BufferedReader(in); + String output; + + // Skip header line + br.readLine(); + + while ((output = br.readLine()) != null) { + Co2Data data = parseData(output, classRoomNumber); + if (data != null) { + dataList.add(data); + } + } + conn.disconnect(); + + } catch (Exception e) { + System.out.println("Exception in NetClientGet: " + e); + } + + return dataList; // Return the list of Co2Data objects + } + + private static Co2Data parseData(String csvLine, int classRoomNumber) { + String[] fields = csvLine.split(","); + if (fields.length < 5) { + return null; // Handle error or log it if needed + } + + try { + // Extract date and time from created_at field + String createdAt = fields[0]; + String[] dateTime = createdAt.split(" "); + String[] dateParts = dateTime[0].split("-"); + String[] timeParts = dateTime[1].split(":"); + + // Create a Date object + int year = Integer.parseInt(dateParts[0]); + int month = Integer.parseInt(dateParts[1]); + int day = Integer.parseInt(dateParts[2]); + int hour = Integer.parseInt(timeParts[0]); + int minute = Integer.parseInt(timeParts[1]); + Date date = new Date(day, month, year, hour, minute); + + // Parse CO2 level (field1) + int co2Level = Integer.parseInt(fields[2]); + + return new Co2Data(date, co2Level); + } catch (Exception e) { + System.out.println("Error parsing data: " + e); + return null; + } + } +} diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java new file mode 100644 index 0000000..12377bb --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Date.java @@ -0,0 +1,41 @@ +public class Date { + private int day; + private int month; + private int year; + private int hour; + private int minute; + + public Date(int day, int month, int year, int hour, int minute) { + this.day = day; + this.month = month; + this.year = year; + this.hour = hour; + this.minute = minute; + } + + // Getters + public int getDay() { + return day; + } + + public int getMonth() { + return month; + } + + public int getYear() { + return year; + } + + public int getHour() { + return hour; + } + + public int getMinute() { + return minute; + } + + @Override + public String toString() { + return String.format("%04d-%02d-%02d %02d:%02d", year, month, day, hour, minute); + } +} diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java new file mode 100644 index 0000000..adf9696 --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/FillTable.java @@ -0,0 +1,81 @@ + +public class FillTable { + 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 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; + } + } + + 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); + } + + 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); + } + + 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); + } +} \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Lesson.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Lesson.java new file mode 100644 index 0000000..fd4d6bc --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Lesson.java @@ -0,0 +1,37 @@ +public class Lesson { + private int roomNumberNumber; + private String teacherInitials; + private String startTime; + private String endTime; + private String weekweekDay; + + // Constructor to initialize all fields + public Lesson(int roomNumber, String teacherInitials, String startTime, String endTime, String weekweekDay) { + this.roomNumberNumber = roomNumber; + this.teacherInitials = teacherInitials; + this.startTime = startTime; + this.endTime = endTime; + this.weekweekDay = weekweekDay; + } + + // Getters + public int getroomNumber() { + return roomNumberNumber; + } + + public String getteacherInitials() { + return teacherInitials; + } + + public String getStartTime() { + return startTime; + } + + public String getEndTime() { + return endTime; + } + + public String getweekDay() { + return weekweekDay; + } +} \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Points.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Points.java new file mode 100644 index 0000000..490549d --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Points.java @@ -0,0 +1,35 @@ +// Points class for managing point categories +public class Points { + private int fiveMinuteBreak; + private int longerBreak; + private int bonusPoints; + + public int getFiveMinuteBreak() { + return fiveMinuteBreak; + } + + public void setFiveMinuteBreak(int fiveMinuteBreak) { + this.fiveMinuteBreak = fiveMinuteBreak; + } + + public int getLongerBreak() { + return longerBreak; + } + + public void setLongerBreak(int longerBreak) { + this.longerBreak = longerBreak; + } + + public int getBonusPoints() { + return bonusPoints; + } + + public void setBonusPoints(int bonusPoints) { + this.bonusPoints = bonusPoints; + } + + // Method to calculate total points + public int getTotalPoints() { + return fiveMinuteBreak + longerBreak + bonusPoints; + } +} \ No newline at end of file diff --git a/Code/Steiner/CO2-Daten-Projekt-V2/src/Teacher.java b/Code/Steiner/CO2-Daten-Projekt-V2/src/Teacher.java new file mode 100644 index 0000000..6802f61 --- /dev/null +++ b/Code/Steiner/CO2-Daten-Projekt-V2/src/Teacher.java @@ -0,0 +1,44 @@ +import java.util.HashMap; +import java.util.Map; + +public class Teacher { + private String name; + private Points points; + + public static final Map nameMap = new HashMap<>(); + static { + nameMap.put("Hm", "Hummel"); + nameMap.put("Bd", "Bender"); + nameMap.put("Bu", "Burger"); + nameMap.put("Cg", "Chung"); + nameMap.put("Do", "Doe"); + nameMap.put("Eh", "Ehrlich"); + nameMap.put("Fh", "Fischer"); + nameMap.put("Gi", "Giordano"); + nameMap.put("Gr", "Graham"); + nameMap.put("Hi", "Higgins"); + nameMap.put("Kg", "Kang"); + nameMap.put("Kh", "Khan"); + nameMap.put("Lz", "Lozano"); + nameMap.put("Lu", "Lund"); + nameMap.put("Or", "Ortega"); + nameMap.put("Re", "Reyes"); + nameMap.put("Se", "Seng"); + nameMap.put("Ts", "Tanaka"); + nameMap.put("Vt", "Vetter"); + nameMap.put("Zu", "Zuniga"); + } + + public Teacher(String name) { + this.name = nameMap.getOrDefault(name, "Unknown"); + this.points = new Points(); + } + + public String getName() { + return name; + } + + public Points getPoints() { + return points; + } +} diff --git a/Code/Steiner/arrayList/.vscode/settings.json b/Code/Steiner/arrayList/.vscode/settings.json new file mode 100644 index 0000000..e112a70 --- /dev/null +++ b/Code/Steiner/arrayList/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "java.project.sourcePaths": ["src"], + "java.project.outputPath": "bin", + "java.project.referencedLibraries": [ + "lib/**/*.jar" + ] +} diff --git a/Code/Steiner/arrayList/README.md b/Code/Steiner/arrayList/README.md new file mode 100644 index 0000000..7c03a53 --- /dev/null +++ b/Code/Steiner/arrayList/README.md @@ -0,0 +1,18 @@ +## Getting Started + +Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. + +## Folder Structure + +The workspace contains two folders by default, where: + +- `src`: the folder to maintain sources +- `lib`: the folder to maintain dependencies + +Meanwhile, the compiled output files will be generated in the `bin` folder by default. + +> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. + +## Dependency Management + +The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/arrayList/bin/App.class b/Code/Steiner/arrayList/bin/App.class new file mode 100644 index 0000000000000000000000000000000000000000..5fe6494edc0e79acfed23deebe62150f5d1b037d GIT binary patch literal 3684 zcmb7HX?Gh}8Gf!UX=G*E$g<j(JYn!xGlXZ{5rIfsA1q2YP&j4au4dQzX`x%>M*@AEGA>Ywl2 zdJDif{%oL4q5aJ2s)2+;_L{Y36{?oIR48A$W-o>csWHcO!U=8~9+^`}OnMbNgLZV7 zNFt@Md)jgB^Yz*l+rMaCsoDy;X>ZZ0&RM=A<9IR=E<1rja+<1&6jQStSD|P4@^n+> zZ0I}gQgLL?K&L{NUZ{sowQ$DwtsB!$5N41?M+OSrCib95VXuI5tg7?0E$dUhSJRsn z`i3u;BH3F-P<$Hu6!vcl9bEJL!5OdOTy<8g(D7W`Jt;c+O!Q+wp<|V>LJ_Z!AHEas zU9^aZ2TZ&VgA`#^Dsxt~Zj*w(Sj0A1rP9cp964a(Acn}RZ`Zsv`&`wo*=~4-x_j?( zPz-uMbu|rgt;OY?EE+a3g1kaH@ch`IeLD*knTLsWo6K3Bb8NrvE@_5FO%z1lu3))-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>2d7csp*Ot*^z~Kj`ai@vWkV zQ9wUqf6#HvF*r;fY3jQk2WaJ$+a8U$;L&z>Q%P-`qq2{Z+K(`ymw^Tdh+YmCXo%K2 z4ixzgO_68`O*asTMoI`zRRS#obyHP(2&mTy(gPND5eEs8UL_Z?NGs3l*bfw43C+DF zw50leL@UE}?4ivLhF`F=gtlSQ=vc!ppoGZHyT8%T651@1hL3NL}hr+k#mlm{}+}0&kz6r literal 0 HcmV?d00001 diff --git a/Code/Steiner/arrayList/src/App.java b/Code/Steiner/arrayList/src/App.java new file mode 100644 index 0000000..3a5a17c --- /dev/null +++ b/Code/Steiner/arrayList/src/App.java @@ -0,0 +1,71 @@ +import java.util.ArrayList; +import java.util.Collections; + +public class App { + public static void main(String[] args) { + int[] array = { 0, 1, 2, 3, 4, 5, 4, -3, -2, 0 }; + ArrayList list = new ArrayList<>(); + + initializeListFromArray(array, list); + printList("ArrayList vor Modifikationen:", list); + + addValues(list, 10, -5); + removeElementAt(list, 1); + printList("ArrayList nach Modifikationen:", list); + + sortList(list); + printList("ArrayList nach Sortierung:", list); + + shuffleList(list); + printList("ArrayList nach dem Mischen:", list); + + printMinMaxValues(list); + } + + // Initialisiert die ArrayList mit Werten aus dem Array + private static void initializeListFromArray(int[] array, ArrayList list) { + for (int num : array) { + list.add(num); + } + } + + // Fügt der ArrayList zwei Werte hinzu + private static void addValues(ArrayList list, int value1, int value2) { + list.add(value1); + list.add(value2); + } + + // Entfernt das Element an einer bestimmten Position + private static void removeElementAt(ArrayList list, int index) { + if (index >= 0 && index < list.size()) { + list.remove(index); + } + } + + // Gibt den Inhalt der ArrayList aus + private static void printList(String message, ArrayList list) { + System.out.println(message); + for (int num : list) { + System.out.print(num + " "); + } + System.out.println(); + } + + // Sortiert die ArrayList + private static void sortList(ArrayList list) { + Collections.sort(list); + } + + // Mischt die ArrayList + private static void shuffleList(ArrayList list) { + Collections.shuffle(list); + } + + // Gibt den maximalen und minimalen Wert der ArrayList aus + private static void printMinMaxValues(ArrayList list) { + int max = Collections.max(list); + int min = Collections.min(list); + System.out.println("Maximaler Wert: " + max); + System.out.println("Minimaler Wert: " + min); + } +} diff --git a/Code/Steiner/repetition-classes-oop/.vscode/settings.json b/Code/Steiner/repetition-classes-oop/.vscode/settings.json new file mode 100644 index 0000000..e112a70 --- /dev/null +++ b/Code/Steiner/repetition-classes-oop/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "java.project.sourcePaths": ["src"], + "java.project.outputPath": "bin", + "java.project.referencedLibraries": [ + "lib/**/*.jar" + ] +} diff --git a/Code/Steiner/repetition-classes-oop/README.md b/Code/Steiner/repetition-classes-oop/README.md new file mode 100644 index 0000000..7c03a53 --- /dev/null +++ b/Code/Steiner/repetition-classes-oop/README.md @@ -0,0 +1,18 @@ +## Getting Started + +Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code. + +## Folder Structure + +The workspace contains two folders by default, where: + +- `src`: the folder to maintain sources +- `lib`: the folder to maintain dependencies + +Meanwhile, the compiled output files will be generated in the `bin` folder by default. + +> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there. + +## Dependency Management + +The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies). diff --git a/Code/Steiner/repetition-classes-oop/bin/App.class b/Code/Steiner/repetition-classes-oop/bin/App.class new file mode 100644 index 0000000000000000000000000000000000000000..2184291832c38fdbb6ed57a67357c10e23e3091e GIT binary patch literal 1893 zcma)6U2_vv7=BK^b`uth+om)iHE6*ED$%M16R5PYrI7@xsl|w2r`tobZL*v0o-p*r zaYo0Hf55F*Uc*J1sUttY|KZ;d-?N+AWRh{5WX|Vv-jC;f-u?6M!xsQb=$G!0)cY*4Tf0R-4ZE8ku(rTf?=#`JK|2ay(zqP zzS$BCX4SQLYlC~X+V>7)vT6Ga@hZ70k(oBP9frx={pzvHy7X*kyQJKtmLFN7BW>65 zHJA+J$EbgAbWD(;+uUpEn50#Wdyk?RTe_(sGmuJXSI1d~DZriqe9p{2KvZ>>B zO7oWR+T77_oIcRpHxPslf*^jG`uw!)V?o8+dv+dh+DTy zRHs9Owp&;uA|!<^c)O&cm^JV=t}qzeLax}JFCE?{rYCaw;TRPD9Ru$w{0YKWc?dVD z;O`lDA0IHBZu4DHb{&h$d$w%S%9q@cRG@4BE6ZRB7+AnZBrJ-(?6y0?@wpO0puma=hDDXdlCn`55r~eDNk8>&pkKe3P2nn5 z4BS%wo6x_#7W$k7W4ZxQOPc z*Ltg0HLAHaKmw~U=zcFdVpN7&C7acrY!%Nv0K>_;uQk zv`17i%d$*IleE?^G& zsX9vi2~rxV6bTwN+7)PKG{-MJhyFCUPSL2Yff!EEXoLWoPtq=lS1?9KP6hW2uPQTa zkzS~GkInI_nXZ|q7ZQJ9su4BM)EhDLwR$6NPS=aE-;r%xo;{a|J;xix_%mF{#1C*; z4TVF@0SB1x9bP}g&7-|pKESd9tu~6u7xQ{_Ui%GaGRd?yS4=2;;t*8@Uj9jAX)Ue) z`tmQ8N;C**jsgb-8HG+kCh3>LG^H|2DJ)_fpJEaXOkochd{6T)I2)wB8u0TNcd-`O z`k9cQ5fusih&rtzWa$U2<8!h+ja_UIE=E?r#yxyN4DXST2H_I;lHO+#d5ImQG~CxP rMSm8ovS4ZfiXn=x2p6IE-_Sfk`z`V&f^j<-ZSn$&o}mQ?9c2CiHagDc literal 0 HcmV?d00001 diff --git a/Code/Steiner/repetition-classes-oop/bin/Teacher.class b/Code/Steiner/repetition-classes-oop/bin/Teacher.class new file mode 100644 index 0000000000000000000000000000000000000000..8fb4a050341192e7e9970d68f938199d3bdd9147 GIT binary patch literal 1336 zcmZ{iU2hUW6o%h{EfknaO96pO)%ww8izOQ44YfB-nvf8^Xv2+H3$An5NyG$_*N)x0ar`6`1U9aC1*dEw-=dw2%es;XE9k?S;K(y#|JW++l z0{b6y>4`JfbAxk%rn!E+?rCX?)H(vj#pt7xMjX2m5_e+*i?Yq1Woknou(j=*NC>o6~`%Z8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-H>|8#qIDf$&vK&>Rn%#o!Zi)VUGjg3DsOJ7h@My_eRO7j$6!`C$C3HuTP VUy+t?(R!Npmk4`1wwGi3{@)Zpm&gDB literal 0 HcmV?d00001 diff --git a/Code/Steiner/repetition-classes-oop/src/App.java b/Code/Steiner/repetition-classes-oop/src/App.java new file mode 100644 index 0000000..98dc525 --- /dev/null +++ b/Code/Steiner/repetition-classes-oop/src/App.java @@ -0,0 +1,28 @@ + +// Main application class where we create a Teacher object and display some +// info. +public class App { + public static void main(String[] args) throws Exception { + // Sample data for creating a Teacher object. + String firstname = "Karl"; + String lastname = "Marx"; + int compensation = 1000000; + String[] subjects = { "Economics", "Math", "German" }; + + // Creating a Teacher object using the data above. + Teacher teacher = new Teacher(firstname, lastname, compensation, subjects); + + // Printing the teacher's full name. + System.out.println("Teacher: " + teacher.getFirstname() + " " + teacher.getLastname()); + + // Printing the teacher's compensation. + System.out.println("Compensation: " + teacher.getCompensation()); + + // Printing the subjects the teacher teaches. + System.out.print("Subjects: "); + // Loop through each subject in the array and print it. + for (String subject : teacher.getSubjects()) { + System.out.print(subject + " "); + } + } +} diff --git a/Code/Steiner/repetition-classes-oop/src/Teacher.class b/Code/Steiner/repetition-classes-oop/src/Teacher.class new file mode 100644 index 0000000000000000000000000000000000000000..37c06bab4144125b2834026240478ea5f7d68228 GIT binary patch literal 1054 zcmZva&2G~`6otV=cDVG;%5fP;|D>3iePe)L*imkA55i7n_R3>oS$O+3Iu0d1ud*v>BYLwa8Vbbo~dJ_U_0 zMTH^>{8A(&&E%w+C}tgO72AxD_}8PZ%KX&*1>ts=P~6icDsE>9)orOuRDW=nFG^}y z1FWK^6?D=JH0ZKLK3@%XR?H5wpt9=zgz|lTyp}Fnj7{t^%JPRSuQ1or(pf1ZU2V{s zgzlB1D@F7krBBMyl_I)L^fT&P?CRFaeb?%@g6n;X+UbG3>o&(!L?01-OnnE>OVHJ# c>l2Fh@nR*-4dmYJZwJyP`jpB8+EZ}&AC8H)MgRZ+ literal 0 HcmV?d00001 diff --git a/Code/Steiner/repetition-classes-oop/src/Teacher.java b/Code/Steiner/repetition-classes-oop/src/Teacher.java new file mode 100644 index 0000000..4a0af07 --- /dev/null +++ b/Code/Steiner/repetition-classes-oop/src/Teacher.java @@ -0,0 +1,61 @@ +// The Teacher class represents a teacher with a first name, last name, compensation, and subjects they teach. +public class Teacher { + // Private fields to store the teacher's first name, last name, compensation, + // and subjects. + private String firstname; + private String lastname; + private int compensation; + private String[] subjects; + + // Constructor for initializing a Teacher object with provided details. + public Teacher(String firstname, String lastname, int compensation, String[] subjects) { + // Assigning the provided first name to the teacher's firstname field. + this.firstname = firstname; + // Assigning the provided last name to the teacher's lastname field. + this.lastname = lastname; + // Assigning the provided compensation to the teacher's compensation field. + this.compensation = compensation; + // Assigning the provided array of subjects to the teacher's subjects field. + this.subjects = subjects; + } + + // Getter method for getting the teacher's first name. + public String getFirstname() { + return firstname; + } + + // Setter method for setting a new first name for the teacher. + public void setFirstname(String firstname) { + this.firstname = firstname; + } + + // Getter method for getting the teacher's last name. + public String getLastname() { + return lastname; + } + + // Setter method for setting a new last name for the teacher. + public void setLastname(String lastname) { + this.lastname = lastname; + } + + // Getter method for getting the teacher's compensation. + public int getCompensation() { + return compensation; + } + + // Setter method for setting a new compensation for the teacher. + public void setCompensation(int compensation) { + this.compensation = compensation; + } + + // Getter method for getting the array of subjects the teacher teaches. + public String[] getSubjects() { + return subjects; + } + + // Setter method for setting a new array of subjects for the teacher. + public void setSubjects(String[] subjects) { + this.subjects = subjects; + } +} \ No newline at end of file