Exemple #1
0
        public void UsunOcene(string nazwaPrzedmiotu, string data, double wartosc)
        {
            for (int i = 0; i < oceny.Count;)
            {
                Ocena o = oceny[i];
                if (o.NazwaPrzedmiotu == nazwaPrzedmiotu && o.Data == data && o.Wartosc == wartosc)
                {
                    oceny.RemoveAt(i);
                }

                else
                {
                    ++i;
                }
            }
        }
        public void UsunOcene(string nazwaPrzedmiotu, string data, double wartosc)
        {
            for (int i = 0; i < oceny.Count;)
            {
                Ocena temp = oceny[i];
                if (temp.NazwaPrzedmiotu.Equals(nazwaPrzedmiotu) && temp.Data.Equals(data) && temp.Wartosc.Equals(wartosc))
                {
                    oceny.RemoveAt(i);
                }
                else
                {
                    i++;
                }
            }

            Console.WriteLine("Usunięto ocenę!");
        }
Exemple #3
0
        public void DodajOcene(string nazwaPrzedmiotu, string data, double wartosc)
        {
            Ocena ocena = new Ocena(nazwaPrzedmiotu, data, wartosc);

            oceny.Add(ocena);
        }