33 lines
938 B
C#
33 lines
938 B
C#
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}");
|
|
}
|
|
}
|
|
}
|