public void TargyFelvesz(Targy targy) { if (TargyDb < Targyak.Length) { Targyak[TargyDb++] = targy; } }
private int Jegykeres(Targy prog) { for (int i = 0; i < Targyak.Length; i++) { if (Targyak[i].Nev == prog.Nev) { return(Targyak[i].Jegy); } } return(-1); }
private int IndexKeres(Targy targy) { for (int i = 0; i < TargyDb; i++) { if (Targyak[i].Nev == targy.Nev) { return(i); } } return(-1); }
public Hallgato(int targydarabszam) { Targyak = new Targy[targydarabszam]; TargyDb = 0; }