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 dad9f9a..a9053e0 100644 Binary files a/out/production/Anwendungsentwicklung/Klausur_ueb/StreamsTraining.class and b/out/production/Anwendungsentwicklung/Klausur_ueb/StreamsTraining.class differ diff --git a/out/production/Anwendungsentwicklung/P6/Praktikum.class b/out/production/Anwendungsentwicklung/P6/Praktikum.class index 8416952..971fb13 100644 Binary files a/out/production/Anwendungsentwicklung/P6/Praktikum.class and b/out/production/Anwendungsentwicklung/P6/Praktikum.class differ