[chore:] added fields to structs.cs
This commit is contained in:
59
structs.cs
59
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<string>? 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<Student> Students { get; set; } = [];
|
||||
public List<Sport> Sports { get; set; } = [];
|
||||
|
||||
public Settings()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static void Import(string path)
|
||||
{
|
||||
// Hier importieren...
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user