From ad71f0fd47d5e3088026068f53e92c434ba98b79 Mon Sep 17 00:00:00 2001 From: Elias Fierke Date: Mon, 9 Feb 2026 17:44:48 +0100 Subject: [PATCH] [chore:] added fields to structs.cs --- structs.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/structs.cs b/structs.cs index 8d9f1ea..5fed5e6 100644 --- a/structs.cs +++ b/structs.cs @@ -1,10 +1,67 @@ +using System.Collections.Generic; + namespace spplus; -public class Sport +public abstract class Sport { public string Name { get; set; } = "Neuer Kurs"; // Kursname public int MaxCoursesPerSemester { get; set; } = 1; // Maximale Anzahl an Kursen pro Semester public int MaxStudents { get; set; } = 20; // Maximale Anzahl an Schülern pro Kurs public int MinStudents { get; set; } = 5; // Minimale Anzahl an Schülern pro Kurs public int[] Semester { get; set; } = [1, 2, 3, 4]; // Angebot in diesen Semestern + + protected Sport() + { + + } + + protected Sport(string name) + { + Name = name; + } + + protected Sport(string name, int maxCoursesPerSemester, int maxStudents, int minStudents, int[] semester) + { + Name = name; + MaxCoursesPerSemester = maxCoursesPerSemester; + MaxStudents = maxStudents; + MinStudents = minStudents; + Semester = semester; + } +} + +public abstract class Student +{ + public string Name { get; set; } = ""; // Name des Schülers + public Sport[] SelectedCourses { get; set; } = new Sport[4]; // Kurswahl + public List? Result { get; set; } = null; + + protected Student() + { + + } + + protected Student(string name, Sport[] selectedCourses) + { + Name = name; + SelectedCourses = selectedCourses; + } +} + +public class Settings +{ + public static Settings Instance = new Settings(); + + public List Students { get; set; } = []; + public List Sports { get; set; } = []; + + public Settings() + { + + } + + public static void Import(string path) + { + // Hier importieren... + } } \ No newline at end of file