add Programmyday form github
This commit is contained in:
32
StudentenDatenbank/Student.cs
Normal file
32
StudentenDatenbank/Student.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StudentenDatenbank
|
||||
{
|
||||
internal class Student
|
||||
{
|
||||
private int matrikelNr;
|
||||
private string? name;
|
||||
private string? fachrichtung;
|
||||
|
||||
public Student(int matrikelNr, string? name, string? fachrichtung)
|
||||
{
|
||||
this.matrikelNr = matrikelNr;
|
||||
this.name = name;
|
||||
this.fachrichtung = fachrichtung;
|
||||
}
|
||||
public int GetMatrikelNr() { return this.matrikelNr; }
|
||||
public string? GetName() { return this.name; }
|
||||
public string? GetFachrichtung() { return this.fachrichtung; }
|
||||
|
||||
public void PrintMe()
|
||||
{
|
||||
Console.WriteLine($"Matrikel-Nr.: {this.matrikelNr}");
|
||||
Console.WriteLine($"Name: {this.name}");
|
||||
Console.WriteLine($"Fachrichtung: {this.fachrichtung}");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user