Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);

            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Średnia wartośc: " + stats.AverageGrade);
            Console.WriteLine("Max wartośc: " + stats.MaxGrade);
            Console.WriteLine("Min wartośc: " + stats.MinGrade);


            Diary diary2 = new Diary();

            diary2.AddRating(5);
            diary2.AddRating(8.5f);
            diary2.AddRating(4.7f);
            diary2.AddRating(9.7f);

            stats = diary2.ComputeStatistics();

            Console.WriteLine("Średnia wartośc: " + stats.AverageGrade);
            Console.WriteLine("Max wartośc: " + stats.MaxGrade);
            Console.WriteLine("Min wartośc: " + stats.MinGrade);

            Diary diary3 = new Diary();
            Diary diary4 = new Diary();
            Diary diary5 = new Diary();

            Console.WriteLine(Diary.Count);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);



            Console.WriteLine(Diary.MaxGrade);

            Diary diary2 = new Diary();
            Diary diary3 = new Diary();
            Diary diary4 = new Diary();
            Diary diary5 = new Diary();
            Diary diary6 = new Diary();

            Console.WriteLine(Diary.MaxGrade);

            Console.WriteLine(Diary.Count);

            Console.WriteLine(diary3.Count2);
            Console.WriteLine(diary6.Count2);
            DiaryStatistics stats = diary.ComputeStatistics();

            Console.ReadKey();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1.2f);
            diary.AddRating(3.5f);

            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Srednia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            Diary diary2 = new Diary();

            diary2.AddRating(5);
            diary2.AddRating(2);
            diary2.AddRating(6);
            diary2.AddRating(8);
            diary2.AddRating(9);

            stats = diary2.ComputeStatistics();

            Console.WriteLine("Srednia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            Console.ReadLine();
        }
Ejemplo n.º 4
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);

            DiaryStatistics stats = diary.ComputerStatistics();

            Console.WriteLine("Srednia wartosc" + stats.AverageGrade);
            Console.WriteLine("Maksymalna wartosc" + stats.MaxGrade);
            Console.WriteLine("Minimalna wartosc" + stats.MinGrade);


            /*
             * for (; ; )
             * {
             *      Console.WriteLine("Poda ocenę z zakresu 1 - 10");
             *
             *      float rating;
             *      bool result = float.TryParse(Console.ReadLine(), out rating);
             *
             *      diary.AddRating(rating);
             *
             *      if(rating == 11)
             *      {
             *              break;
             *      }
             *
             *      if (result == true)
             *      {
             *              if(rating > 0 && rating <= 10)
             *              {
             *                      diary.AddRating(rating);
             *              }
             *              else
             *              {
             *                      Console.WriteLine("Nie poprawna liczba. Podaj liczbę z zakresu 1 - 10");
             *              }
             *      }
             *
             *
             * }
             *
             * Console.WriteLine("Średnia Twoich ocen to : " + diary.CalculateAverage());
             * Console.WriteLine("Najwyższa ocena to : " + diary.GiveMaxRating());
             * Console.WriteLine("Najniższa ocena to : " + diary.GiveMinRating());
             * Console.ReadKey();
             */
        }
Ejemplo n.º 5
0
        public DiaryStatistics ComputeStatistics()
        {
            DiaryStatistics stats = new DiaryStatistics();

            float sum = 0f;

            foreach (var rating in ratings)
            {
                sum += rating;
            }
            stats.AverageGrade = sum / ratings.Count();
            stats.MaxGrade     = ratings.Max();
            stats.MinGrade     = ratings.Min();
            return(stats);
        }
Ejemplo n.º 6
0
        internal DiaryStatistics ComputeStatistics()
        {
            DiaryStatistics stats = new DiaryStatistics();
            float           suma  = 0f;

            foreach (var rating in ratings)
            {
                suma += rating;     //to samo co: sum = sum + rating;
            }

            stats.averageGrade = suma / ratings.Count();
            stats.maxGrade     = ratings.Max();
            stats.minGrade     = ratings.Min();

            return(stats);
        }
Ejemplo n.º 7
0
        public DiaryStatistics ComputeStatistics()
        {
            DiaryStatistics diaryStatistics = new DiaryStatistics();

            float sum = 0;

            foreach (var rating in ratings)
            {
                sum += rating;
            }
            diaryStatistics.AverageGrade = sum / ratings.Count();
            diaryStatistics.MaxGrade     = ratings.Max();
            diaryStatistics.MiniGrade    = ratings.Min();

            return(diaryStatistics);
        }
Ejemplo n.º 8
0
        //public float CalculateAverage()
        //{
        //    var sum = (float)0;
        //    var avg = (float)0;

        //    foreach (var rating in Ratings)
        //    {
        //        sum += rating;
        //    }

        //    avg = sum / Ratings.Count();
        //    return avg;
        //}

        public DiaryStatistics ComputeStats()
        {
            // chcemy, żeby metoda zwracałą obiekt DiaryStatistics
            DiaryStatistics stats = new DiaryStatistics();

            var sum = 0f;

            foreach (var rating in Ratings)
            {
                sum += rating;
            }
            stats.AverageGrade = sum / Ratings.Count();
            stats.MaxGrade     = Ratings.Max();
            stats.MinGrade     = Ratings.Min();

            return(stats);
        }
Ejemplo n.º 9
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(3.5f);
            diary.AddRating(1.5f);

            DiaryStatistics stats = diary.ComputeStatistics();


            //float avg = diary.CalculateAverage();
            //float min = diary.GiveMinRating();
            //float max = diary.GiveMaxRating();

            //for ( ; ; )
            //{
            //    Console.WriteLine("Podaj ocenę w zakresie 1 - 10");
            //    float rating;
            //    bool result = float.TryParse(Console.ReadLine(), out rating);



            //    if (rating == 11)
            //    {
            //        break;
            //    }

            //    if (result == true)
            //    {
            //        if (rating > 0 && rating <= 10)
            //        {
            //            diary.AddRating(rating);
            //        }
            //        else
            //        {
            //            Console.WriteLine("Niepoprawna ocena !");
            //        }

            //    }
            //}
            //Console.WriteLine("Średnia ocena to : " + diary.CalculateAverage());
            //Console.WriteLine("Najwyższa ocena to : " + diary.GiveMaxRating());
            //Console.WriteLine("Najniższa ocena to : " + diary.GiveMinRating());
            //Console.ReadKey();
        }
Ejemplo n.º 10
0
        /// <summary>
        ///  Obliczanie statystyk dzienniczka i przechowywanie ich w nowym obiekcie DiaryStatistics
        /// </summary>
        /// <returns></returns>
        internal DiaryStatistics ComputeStatistics()    // Obliczanie statystyk ocen - odcinek 12
        {
            DiaryStatistics stats = new DiaryStatistics();

            float sum = 0f;                 // f - ze to liczba float a nie int

            foreach (var rating in ratings)
            {
                sum += rating;              // sumowanie wszystkich ocen
            }

            stats.AverageGrade = sum / ratings.Count();    // Count() - zwraca ilosc elementow (tutaj na liscie/kolekcji ratings)
            stats.MaxGrade     = ratings.Max();
            stats.MinGrade     = ratings.Min();

            return(stats);
        }
Ejemplo n.º 11
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);


            DiaryStatistics stats = diary.ComputerStatistics();

            Console.WriteLine("Średnia wartość:  " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena:  " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena:  " + stats.MinGrade);

            //SpeechSynthesizer synt = new SpeechSynthesizer();
            //synt.Speak("Cześć Marcin");
        }
Ejemplo n.º 12
0
        internal DiaryStatistics ComputeStatistics()
        {
            DiaryStatistics stats = new DiaryStatistics();

            float sum = 0f;

            foreach (var rating in ratings)
            {
                //sum = sum + rating; to samo co na dole
                sum += rating;
            }

            stats.AverageGrade = sum / ratings.Count();
            stats.MaxGrade     = ratings.Max();
            stats.MinGrade     = ratings.Min();

            return(stats);
        }
Ejemplo n.º 13
0
        static void Main(string[] args)
        {
            Diary[] Uczniowie = new Diary[2];
            for (int i = 0; i < 2; i++)
            {
                Console.WriteLine("Wprowadz oceny ucznia nr " + (i + 1));
                Diary diary = new Diary();
                //diary.AddRating(5);
                //diary.AddRating(4.5f);
                //diary.AddRating(4.8f);
                //diary.AddRating(2.5f);

                diary.AddRating();

                //Console.WriteLine("Srednia twoich ocen = " + diary.CalculateAverage());
                //Console.WriteLine("Najlepsza twoja ocena to " + diary.MaxRating());
                //Console.WriteLine("Najgorsza twoja ocena to " + diary.MinRating());

                DiaryStatistics diaryStatistics = diary.ComputeStatistics();
                Console.WriteLine("Srednia twoich ocen = " + diaryStatistics.AverageGrade);
                Console.WriteLine("Najlepsza twoja ocena to " + diaryStatistics.MaxGrade);
                Console.WriteLine("Najgorsza twoja ocena to " + diaryStatistics.MiniGrade);
                Swiadectwo.Sprawdzenie((int)diaryStatistics.AverageGrade);

                //Console.WriteLine();
                //Console.WriteLine("Wprowadz oceny ucznia nr 2.");
                //Diary diary2 = new Diary();
                //diary2.AddRating();

                //diaryStatistics = diary2.ComputeStatistics();
                //Console.WriteLine("Srednia twoich ocen = " + diaryStatistics.AverageGrade);
                //Console.WriteLine("Najlepsza twoja ocena to " + diaryStatistics.MaxGrade);
                //Console.WriteLine("Najgorsza twoja ocena to " + diaryStatistics.MiniGrade);
            }

            Console.WriteLine(Diary.count);

            Console.ReadKey();
        }
Ejemplo n.º 14
0
        static void Main(string[] args)
        {
            Diary diary = new Diary(); //Diary() - metoda konstruktor; Tworzenie instancji obiektu typu klasa diary

            diary.AddRating(4);
            diary.AddRating(9);
            diary.AddRating(4.5f);

            DiaryStatistics stats = diary.ComputeStatitsics();

            Console.WriteLine("Średnia ocena: " + stats.avgGrade);
            Console.WriteLine("Max ocena: " + stats.MaxGrade);
            Console.WriteLine("Min ocena: " + stats.MinGrade);



            //for (; ;)
            //{
            //    Console.WriteLine("Podaj ocene: ");
            //    float rating;
            //    bool result = float.TryParse(Console.ReadLine(), out rating);
            //    if (rating == 11)
            //    {
            //        break;
            //    }
            //    if (result && rating <= 10 && rating >= 0)
            //    {
            //        diary.AddRating(rating);
            //    }
            //    else
            //    {
            //        Console.WriteLine("Błędna liczba!");
            //    }

            //}
            Console.ReadKey();
        }
Ejemplo n.º 15
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1.2f);
            diary.AddRating(9.6f);

            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Srednia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymakna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            Diary diary2 = new Diary();

            diary2.AddRating(5);
            diary2.AddRating(2.5f);
            diary2.AddRating(3.7f);
            diary2.AddRating(4.2f);
            diary2.AddRating(7.6f);

            stats = diary2.ComputeStatistics();


            Console.WriteLine("Srednia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymakna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            //SpeechSynthesizer synt = new SpeechSynthesizer();
            //synt.Speak("Cześć Marcin");

            //Console.ReadKey();
        }
Ejemplo n.º 16
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1);
            diary.AddRating(2.5f);
            diary.AddRating(7.3f);
            //float avg = diary.CalculateAverage();
            //float max = diary.GiveMaxRating();
            //float min = diary.GiveMinRating();

            DiaryStatistics stats = diary.ComputeStatistics();


            Console.WriteLine("Średnia ocena: " + stats.averageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.maxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.minGrade);

            Diary diary2 = new Diary();

            diary2.AddRating(4);
            diary2.AddRating(7.5f);
            diary2.AddRating(5.7f);
            diary2.AddRating(2);
            diary2.AddRating(1.5f);
            diary2.AddRating(8.3f);

            stats = diary2.ComputeStatistics();

            Console.WriteLine("Średnia ocena: " + stats.averageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.maxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.minGrade);


            //for (; ;)
            //{
            //    Console.WriteLine("Podaj ocenę z zakresu 1.0 - 10.0");

            //    float rating;
            //    bool result = float.TryParse(Console.ReadLine(), out rating);

            //    if (rating == 11)
            //    {
            //        break;
            //    }

            //    if (result)         //To samo co: if (result == true)
            //    {
            //        if (rating >= 0 && rating <= 10)
            //        {
            //            diary.AddRating(rating);
            //        }
            //        else
            //        {
            //            Console.WriteLine("Liczba poza zakresem.");
            //        }
            //    }
            //}

            //Console.WriteLine("Średnia twoich ocen to: " + diary.CalculateAverage());
            //Console.WriteLine("Najwyższa ocena to: " + diary.GiveMaxRating());
            //Console.WriteLine("Najniższa ocena to: " + diary.GiveMinRating());
            //Console.ReadKey();
        }
Ejemplo n.º 17
0
        //static void GiveName(ref Diary diary)
        //{
        //    diary = new Diary();
        //    diary.Name = "Nowy Dzienniczek Marcina";
        //}

        //static int IncrementNumber(int number)
        //{
        //    number = 42;
        //    return number;
        //}
        static void Main(string[] args)
        //{
        //    //PassByValueAndRef();

        //    // Immutable();
        //    Arrays();
        //}

        //private static void Arrays()
        //{
        //    float[] ratings;
        //    ratings = new float[5];

        //    AddRatings(ratings);


        //    foreach (var rating in ratings)
        //    {
        //        Console.WriteLine(rating);
        //    }
        //}

        //private static void AddRatings(float[] ratings)
        //{
        //    if (ratings.Length >= 4)
        //    {
        //        ratings[0] = 4.2f;
        //        ratings[1] = 6.7f;
        //        ratings[2] = 3f;
        //        ratings[3] = 8.5f;
        //        ratings[4] = 4.4f;
        //    }
        //}

        //private static void Immutable()
        //{
        //    string name = "   Marcin    ";
        //    name = name.Trim();
        //    Console.WriteLine(name);

        //    DateTime date = new DateTime(2015, 3, 10);
        //    date = date.AddHours(48);
        //    Console.WriteLine(date);
        //}


        //string name1 = "  Marcin  ";
        //string name2 = "marcin";

        //bool areEqual = name1.Equals(name2, StringComparison.CurrentCultureIgnoreCase);
        //Console.WriteLine(areEqual);
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1.2f);
            diary.AddRating(9.6f);

            //Diary diary2 = new Diary();
            //Diary diary3 = new Diary();
            //Diary diary4 = new Diary();
            //Diary diary5 = new Diary();
            //Diary diary6 = new Diary();
            //Console.WriteLine(Diary.Count);

            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Średnia Twoich ocen to: " + stats.AverageGrade);
            Console.WriteLine("Najwyższa ocena to: " + stats.MaxGrade);
            Console.WriteLine("Najniższa ocena to: " + stats.MinGrade);
            Console.ReadKey();

            Diary diary2 = new Diary();

            diary2.AddRating(5);
            diary2.AddRating(2.5f);
            diary2.AddRating(3.7f);
            diary2.AddRating(4.2f);
            diary2.AddRating(7.6f);

            stats = diary2.ComputeStatistics();

            Console.WriteLine("Średnia Twoich ocen to: " + stats.AverageGrade);
            Console.WriteLine("Najwyższa ocena to: " + stats.MaxGrade);
            Console.WriteLine("Najniższa ocena to: " + stats.MinGrade);
            Console.ReadKey();

            SpeechSynthesizer synt = new SpeechSynthesizer();

            synt.Speak("Cześć Beatka. Jak się czujesz?. Czego tu");

            //float avg = diary.CalculateAverage();
            //float max = diary.GiveMaxRating();
            //float min = diary.GiveMinRating();
        }
Ejemplo n.º 18
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1.2f);
            diary.AddRating(11.6f); // nie mieści się w zakresie i nie zostanie dodana przez metode


            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Średnia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            Console.WriteLine("maxgrade=" + Diary.MaxGrade);
            Console.WriteLine("mingrade=" + Diary.MinGrade);

            Diary diary2 = new Diary();
            Diary diary3 = new Diary();
            Diary diary4 = new Diary();
            Diary diary5 = new Diary();
            Diary diary6 = new Diary();

            Console.WriteLine("liczba dzienniczków: " + Diary.Count);
            Console.WriteLine("count2 dzienniczka : " + diary.Count2);

            SpeechSynthesizer synth = new SpeechSynthesizer();

            synth.Speak("liczba dzienniczków: " + Diary.Count);



            //Diary diary2 = new Diary();
            //diary2.AddRating(5);
            //diary2.AddRating(2.5f);
            //diary2.AddRating(3.7f);
            //diary2.AddRating(4.2f);
            //diary2.AddRating(7.6f);

            //stats = diary2.ComputeStatistics();

            //Console.WriteLine("Średnia ocena: " + stats.AverageGrade);
            //Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            //Console.WriteLine("Minimalna ocena: " + stats.MinGrade);



            //float avg = diary.CalculateAverage();
            //float max = diary.GiveMaxRating();
            //float min = diary.GiveMinRating();

            //for (;; )
            //{
            //    Console.WriteLine("Podaj ocenę z zakresu 1-10");

            //    float rating;
            //    bool result = float.TryParse(Console.ReadLine(),out rating);


            //    if (rating == 11)
            //    {
            //        break;
            //    }
            //    if (result == true)  // zapis skrócony "if (result)"  domyślnie przyrównuje do true
            //    {
            //        if (rating > 0 && rating <=10)
            //        {
            //            diary.AddRating(rating);
            //        }
            //        else
            //        {
            //            Console.WriteLine("niepoprawna liczba. Podaj liczbe z zakresu 1-10");
            //        }

            //    }



            //}
            //Console.WriteLine("Średnia twoich ocen to : " + diary.CalculateAverage());
            //Console.WriteLine("Najwyższa ocena to : " + diary.GiveMaxRating());
            //Console.WriteLine("Najniższa ocena to : " + diary.GiveMinRating());
            //Console.ReadKey();

            //Diary diary2 = new Diary();
            //Diary diary3 = new Diary();
            //Diary diary4 = new Diary();
            //Diary diary5 = new Diary();
            Console.ReadKey();
        }
Ejemplo n.º 19
0
        static void Main(string[] args)
        {
            Diary diary = new Diary();

            diary.AddRating(5);
            diary.AddRating(8.5f);
            diary.AddRating(4.7f);
            diary.AddRating(1.2f);
            diary.AddRating(9.6f);

            DiaryStatistics stats = diary.ComputeStatistics();

            Console.WriteLine("Średnia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);

            Console.WriteLine();
            Diary diary2 = new Diary();

            diary2.AddRating(5);
            diary2.AddRating(2.5f);
            diary2.AddRating(3.7f);
            diary2.AddRating(4.2f);
            diary2.AddRating(7.6f);

            stats = diary2.ComputeStatistics();

            Console.WriteLine("Średnia ocena: " + stats.AverageGrade);
            Console.WriteLine("Maksymalna ocena: " + stats.MaxGrade);
            Console.WriteLine("Minimalna ocena: " + stats.MinGrade);
            //float avg = diary.CalculateAverage();
            //float max = diary.GiveMaxRating();
            //float min = diary.GiveMinRating();

            //for (; ; )
            //{
            //    Console.WriteLine("Podaj ocenę z zakresu: 1 - 10 (liczba 11 kończy wprowadzanie danych).");

            //    float rating;
            //    bool result = float.TryParse(Console.ReadLine(), out rating);

            //    if (rating == 11)
            //    {
            //        break;
            //    }

            //    if (result)
            //    {
            //        if (rating > 0 && rating <= 10 )
            //        {
            //            diary.AddRating(rating);
            //        }
            //        else
            //        {
            //            Console.WriteLine("Niepoprawna liczba, podaj liczbę z zakresu: 1 - 10.");
            //        }
            //    }
            //}

            //Console.WriteLine("Średnia twoich ocen to: " + diary.CalculateAverage());
            //Console.WriteLine("Najwyższa ocena to: " + diary.GiveMaxRating());
            //Console.WriteLine("Najniższa ocena to: " + diary.GiveMinRating());

            //Console.ReadKey();
        }
Ejemplo n.º 20
0
        static void Main(string[] args)
        {
            // tworzymy NOWY obiekt dzienniczek - instancję klasy Diary - > słowo kluczowe NEW
            // instancję tworzy konstruktor (w tym wypadku "domyślny" -> tworzymy tablicę)

            Diary diary = new Diary();

            // dodajemy pierwszą ocenę -> zmienna PLUS "." -> korzystamy ze zdefiniowanych metod

            diary.AddRating(5);
            diary.AddRating(8.5f); //f za liczbą -> typ float
            diary.AddRating(4.7f);

            DiaryStatistics stats = diary.ComputeStats();

            Console.WriteLine("średnia wartość " + stats.AverageGrade);
            Console.WriteLine("max wartość " + stats.MaxGrade);
            Console.WriteLine("min wartość " + stats.MinGrade);

            Diary diary2 = new Diary();
            Diary diary3 = new Diary();
            Diary diary4 = new Diary();
            Diary diary5 = new Diary();
            Diary diary6 = new Diary();

            Console.WriteLine(Diary.Counter);
            Console.WriteLine(diary3.Counter2);
            Console.WriteLine(diary6.Counter2);



            //var avg = diary.CalculateAverage();
            //var max = diary.GiveMaxRating();
            //var min = diary.GiveMinRating();

            //for ( ; ; ) // pętla nieskończona
            //{
            //    Console.Write("Podaj ocenę z zakresu 1 - 10 (aby zakończyć wpisz 11): ");
            //    float rating;
            //    bool isFloat = float.TryParse(Console.ReadLine(), out rating);

            //    if (rating == 11)
            //    {
            //        break;
            //    }

            //    if (isFloat)
            //    {
            //        if (rating > 0 && rating <= 10)
            //        {
            //            diary.AddRating(rating);
            //        }
            //        else
            //        {
            //            Console.WriteLine("Niepoprawna ocena, wpisz ponownie (z zakresu 1 -10)");
            //        }
            //    }

            //}

            //Console.WriteLine("Średnia Twoich ocen to " + diary.CalculateAverage());
            //Console.WriteLine("Najwyższa ocena to " + diary.GiveMaxRating());
            //Console.WriteLine("Najniższa Twoich ocen to " + diary.GiveMinRating());
            //Console.ReadKey();
        }