[chore:] small type fixes
This commit is contained in:
16
structs.cs
16
structs.cs
@@ -2,7 +2,7 @@ using System.Collections.Generic;
|
||||
|
||||
namespace spplus;
|
||||
|
||||
public abstract class Sport
|
||||
public class Sport
|
||||
{
|
||||
public string Name { get; set; } = "Neuer Kurs"; // Kursname
|
||||
public int MaxCoursesPerSemester { get; set; } = 1; // Maximale Anzahl an Kursen pro Semester
|
||||
@@ -30,23 +30,29 @@ public abstract class Sport
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class Student
|
||||
public class Student
|
||||
{
|
||||
public string ID { get; set; } = ""; // ID des Schüler (z.B. NolteSeb)
|
||||
public string Name { get; set; } = ""; // Name des Schülers
|
||||
public Sport[] SelectedCourses { get; set; } = new Sport[4]; // Kurswahl
|
||||
public List<string> SelectedCourseNames { get; set; } = new();
|
||||
public List<string>? Result { get; set; } = null;
|
||||
|
||||
protected Student()
|
||||
public Student()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected Student(string id, string name, Sport[] selectedCourses)
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Name} ({ID})";
|
||||
}
|
||||
|
||||
public Student(string id, string name, List<string> selectedCoursesNames)
|
||||
{
|
||||
ID = id;
|
||||
Name = name;
|
||||
SelectedCourses = selectedCourses;
|
||||
SelectedCourseNames = selectedCoursesNames;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user