示例#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;
        }
示例#2
0
        public override bool Equals(object obj)
        {
            Fach fach = obj as Fach;

            return(fach != null && this.fachname.Equals(fach.fachname) && this.schuljahr.Equals(fach.schuljahr));
        }