From 9a1615c1eac34fd2fdf447a5bbe92d2c08a7669d Mon Sep 17 00:00:00 2001 From: Gentleman-DE Date: Mon, 30 Sep 2024 18:17:21 +0200 Subject: [PATCH] a --- .idea/libraries/openjfx_javafx_base.xml | 2 +- .idea/libraries/openjfx_javafx_controls.xml | 6 +-- .idea/libraries/openjfx_javafx_graphics.xml | 4 +- .../src/Klausur_ueb/StreamsTraining.java | 4 +- .../src/P6/Praktikum.java | 2 + .../PyCharm/pythonProject/.idea/.gitignore | 8 +++ .../inspectionProfiles/profiles_settings.xml | 6 +++ WS24_25/PyCharm/pythonProject/.idea/misc.xml | 7 +++ .../PyCharm/pythonProject/.idea/modules.xml | 8 +++ .../pythonProject/.idea/pythonProject.iml | 11 ++++ WS24_25/PyCharm/pythonProject/.idea/vcs.xml | 6 +++ WS24_25/PyCharm/pythonProject/P1/kek.py | 51 ++++++++++++++++++ .../Klausur_ueb/StreamsTraining.class | Bin 6161 -> 6065 bytes .../Anwendungsentwicklung/P6/Praktikum.class | Bin 2481 -> 2481 bytes 14 files changed, 107 insertions(+), 8 deletions(-) create mode 100644 WS24_25/PyCharm/pythonProject/.idea/.gitignore create mode 100644 WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml create mode 100644 WS24_25/PyCharm/pythonProject/.idea/misc.xml create mode 100644 WS24_25/PyCharm/pythonProject/.idea/modules.xml create mode 100644 WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml create mode 100644 WS24_25/PyCharm/pythonProject/.idea/vcs.xml create mode 100644 WS24_25/PyCharm/pythonProject/P1/kek.py diff --git a/.idea/libraries/openjfx_javafx_base.xml b/.idea/libraries/openjfx_javafx_base.xml index 6f47257..90e7dbd 100644 --- a/.idea/libraries/openjfx_javafx_base.xml +++ b/.idea/libraries/openjfx_javafx_base.xml @@ -3,7 +3,7 @@ - + diff --git a/.idea/libraries/openjfx_javafx_controls.xml b/.idea/libraries/openjfx_javafx_controls.xml index 52406f3..5956572 100644 --- a/.idea/libraries/openjfx_javafx_controls.xml +++ b/.idea/libraries/openjfx_javafx_controls.xml @@ -3,11 +3,11 @@ - + - + - + diff --git a/.idea/libraries/openjfx_javafx_graphics.xml b/.idea/libraries/openjfx_javafx_graphics.xml index 0cfcecc..8fdcc88 100644 --- a/.idea/libraries/openjfx_javafx_graphics.xml +++ b/.idea/libraries/openjfx_javafx_graphics.xml @@ -3,9 +3,9 @@ - + - + diff --git a/WS23_24/Anwendungsentwicklung/src/Klausur_ueb/StreamsTraining.java b/WS23_24/Anwendungsentwicklung/src/Klausur_ueb/StreamsTraining.java index 40f7570..7e1d944 100644 --- a/WS23_24/Anwendungsentwicklung/src/Klausur_ueb/StreamsTraining.java +++ b/WS23_24/Anwendungsentwicklung/src/Klausur_ueb/StreamsTraining.java @@ -41,7 +41,7 @@ public class StreamsTraining { } static void directFib2(){ IntStream.rangeClosed(0, 10) - .mapToObj(n -> fibonacciiii(n)) + .mapToObj(StreamsTraining::fibonacciiii) .forEach(System.out::println); } public static int fibonacciiii(int n) { @@ -74,7 +74,7 @@ public class StreamsTraining { .filter(w -> w.length() > 6) .forEach(System.out::println); } - + static long fak(long input){ return LongStream.range(1,input+1) diff --git a/WS23_24/Anwendungsentwicklung/src/P6/Praktikum.java b/WS23_24/Anwendungsentwicklung/src/P6/Praktikum.java index ffddc66..64d14ab 100644 --- a/WS23_24/Anwendungsentwicklung/src/P6/Praktikum.java +++ b/WS23_24/Anwendungsentwicklung/src/P6/Praktikum.java @@ -1,6 +1,7 @@ package P6; import java.io.BufferedWriter; +import java.io.File; import java.io.IOException; import java.nio.file.Path; import java.nio.file.Paths; @@ -14,6 +15,7 @@ public class Praktikum { var time = java.time.LocalDateTime.now(); Path p = Paths.get(home, "java-text.tmp"); + try { if (Files.exists(p)) Files.delete(p); diff --git a/WS24_25/PyCharm/pythonProject/.idea/.gitignore b/WS24_25/PyCharm/pythonProject/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml b/WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/WS24_25/PyCharm/pythonProject/.idea/misc.xml b/WS24_25/PyCharm/pythonProject/.idea/misc.xml new file mode 100644 index 0000000..5ae44a1 --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/misc.xml @@ -0,0 +1,7 @@ + + + + + + \ No newline at end of file diff --git a/WS24_25/PyCharm/pythonProject/.idea/modules.xml b/WS24_25/PyCharm/pythonProject/.idea/modules.xml new file mode 100644 index 0000000..e15ec35 --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml b/WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml new file mode 100644 index 0000000..2d9e6c3 --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/pythonProject.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/WS24_25/PyCharm/pythonProject/.idea/vcs.xml b/WS24_25/PyCharm/pythonProject/.idea/vcs.xml new file mode 100644 index 0000000..c2365ab --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/WS24_25/PyCharm/pythonProject/P1/kek.py b/WS24_25/PyCharm/pythonProject/P1/kek.py new file mode 100644 index 0000000..f3ef1a6 --- /dev/null +++ b/WS24_25/PyCharm/pythonProject/P1/kek.py @@ -0,0 +1,51 @@ +# def fac(x,y=2): +# return x**y +# list = [1,2,3] +# list2 =[] +# for i in range(len(list)): +# list[i] = fac(list[i]) +# print (list) + + +class Lecture: + def __init__(self, title): + """ + Initializes a new Lecture instance with a title and an empty list of students. + + :param title: Title of the lecture + """ + self.title = title + self.students = [] + + def add_student(self, student_name): + """ + Adds a student to the lecture. + + :param student_name: Name of the student to be added + """ + if student_name not in self.students: + self.students.append(student_name) + print(f"{student_name} has been added to the lecture '{self.title}'.") + else: + print(f"{student_name} is already enrolled in the lecture '{self.title}'.") + + def number_of_students(self): + """ + Returns the number of students enrolled in the lecture. + + :return: The count of students + """ + return len(self.students) + + +# Example usage + +# Create a new lecture +python_lecture = Lecture("Introduction to Python") +# Add students +python_lecture.add_student("Alice") +python_lecture.add_student("Bob") +python_lecture.add_student("Alice") # Attempt to add Alice again + +# Get the number of students +print(f"Number of students enrolled in '{python_lecture.title}': {python_lecture.number_of_students()}") diff --git a/out/production/Anwendungsentwicklung/Klausur_ueb/StreamsTraining.class b/out/production/Anwendungsentwicklung/Klausur_ueb/StreamsTraining.class index dad9f9af48f81e990f8297b38fd7674e7e163863..a9053e05ee75cd7087cd2e48ce2d0f0827410c67 100644 GIT binary patch delta 1498 zcmah}OLG)e6#mY1PiE3{Gt=`nOgSVlXb6}gm@!66bS$eRkSfB$4I66`(Fz8J^0jc| zS~r%}{sC7SR3tFzHM?Q!|bw8Flm6NPSCfbaaeAf!#H@bkI8%yHWbRs_G11CdhVq)mYlQ zTV+!fL43TndE};AX}o^h#?7TZ?;$lXby8Wf>N5vXe6H{Tj=DISXu%iS@ukB1IO5_6 z9p7ljw+io>@b~)Z2ZgtF_=MLRFT{Uxa0z}^Sb-BRPI(*Rg;l?5{lTR}n`(E}%Hy>y zx0Kh7Y}z<_$Cc#!T{HZlum{h$sL=7ZcFZaq#+$DGpCxO)w1JU-7!fGEfkQ41CBkA+ zN^D9=*zYiNsVm_`i$ry5tHME@dVmh49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