Ejemplo n.º 1
0
        public Ergebis(Schüler schüler, Fach fach, Schulhalbjahr schulhalbjahr, int note)
        {
            if (note < 1 || note > 6)
            {
                throw new Exception("Ungültige Note");
            }
            if (schüler == null || fach == null || schulhalbjahr == null)
            {
                throw new Exception("Es Fehlt mindestens eine Angabe des Ergebisses");
            }

            this._schüler       = schüler;
            this._fach          = fach;
            this._schulhalbjahr = schulhalbjahr;
            this._note          = note;
        }
Ejemplo n.º 2
0
        public override bool Equals(object obj)
        {
            Schulhalbjahr schuljahr = obj as Schulhalbjahr;

            return(schuljahr != null && this._schuljahr.Equals(schuljahr._schuljahr) && this._halbjahr.Equals(schuljahr._halbjahr));
        }