<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.NetworkInformation;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace Train101
{
    
   
 class Program
    {
        static void Main(string[] args)
        {
            var dateTime = new DateTime(2017, 2, 21, 12, 27, 0).AddHours(10);
            var Tekst = "anything";
            var Number = 14;
           
            Produkty p1 = new Produkty(150.66);
            Cat Little = new Cat("Little Cat");
            Little.showName();
            BlackCat c1 = new BlackCat("Black");
            c1.showName();
            
            Console.WriteLine(TekstWithValue(Tekst, Number.ToString()));
            Console.WriteLine(NowDate());
            Console.WriteLine(NewDate(dateTime.ToString()));
            Console.WriteLine(NowDate());
            Console.ReadLine();
           


        }

        static string NowDate()
        {
            return DateTime.Now.ToLongDateString();
        }

        static string NewDate(string dateTime)
        {
            return dateTime;  // tutaj za cholerę nie wiem, jak to zrobić z dwomoma parametrami


        }

        static string TekstWithValue(string Tekst, string Number)
        {
            return Tekst + "*" + Number;
        }

        
        

    }

    class Produkty
    {
        private double cena;

        public Produkty(double cena)
        {
            this.cena = cena;
        }

        public void pokazCene()
        {
            Console.WriteLine(cena);
        }
    }
}





<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train102
{
    class Pizza
    {
        public double cena;
        public string nazwa;

        public void Dispaly()
        {
            var NazwaWyswiatlana = "Pizza" + " " + nazwa + " " + "kosztuje" + " " + cena + " " + "zł";
            Console.WriteLine(NazwaWyswiatlana);

        }

        public Pizza(string nazwa, double cena)
        {
            this.nazwa = nazwa;
            this.cena = cena;
            
        }

        public Pizza()
        {
            cena = 0;
            nazwa = "";
        }


        public static void DisplayStatic()
        {
            Console.WriteLine("to jest statyczna czesc Pizzy");
        }

        public override string ToString()
        {
            return base.ToString();
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train101
{
    class Cat
    {
        public string name;

        public Cat(string name)// stworzenie konstruktora, ktory pobiera jeden argument name, konstruktor musi miec taka sama nazwe, jak nazwa klasy- w tym przypadku Cat
        {
            this.name = name;
        }

        public void showName()
        {
            Console.WriteLine(name);
        }

    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train102
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] imiona = new string[5];
            imiona[0] = "Ala";
            imiona[1] = "Gosia";
            imiona[2] = "Ania";
            imiona[3] = "Franek";
            imiona[4] = "John";
            Console.WriteLine(imiona[0]);
            Console.WriteLine(imiona[1]);
            Console.WriteLine(imiona[2]);
            Console.WriteLine(imiona[3]);
            Console.WriteLine(imiona[4]);

            string[] imionka = { "Tomek", "Zosia", "Kalina", "Malwina", "Bartoszek" };
            Console.WriteLine(imionka[0]);
            Console.WriteLine(imionka[1]);
            Console.WriteLine(imionka[2]);
            Console.WriteLine(imionka[3]);
            Console.WriteLine(imionka[4]);

            string[] rodzajePizzy = {"Margarita", "Buenos Aires", "Solidna", "Wiejska", "Miejska", "Niezbyt dobra"};
            Console.WriteLine(rodzajePizzy[0]);
            Console.WriteLine(rodzajePizzy[1]);
            Console.WriteLine(rodzajePizzy[2]);
            Console.WriteLine(rodzajePizzy[3]);
            Console.WriteLine(rodzajePizzy[4]);
            Console.WriteLine(rodzajePizzy[5]);

            Calculator calc = new Calculator();
            Console.WriteLine(calc.Suma(10,8));
            Console.WriteLine(calc.Roznica(10, 5));
            Console.WriteLine(calc.Iloczyn(6, 3));
            Console.WriteLine(calc.Iloraz(10, 2));

            GreekPizza p1 = new GreekPizza();
            p1.Dispaly();
            DisplayValues(10, 20);

            var zwroconaSuma = zwrocSume(5, 8);
            Console.WriteLine(zwroconaSuma);

            Pizza.DisplayStatic();

            Pizza greek = new GreekPizza();

            greek.Dispaly();

            Console.ReadLine();

            //1. Stwórz tablice zawierającą pięć imion
            //2.Stwórz inne rodzaje Pizzy(nazwy wymysl) i stwórz listę z różnymi rodzajami Pizzy

           
    

        }

        static void DisplayValues(int a, int b)
        {
            Console.WriteLine("A = " + a);
            Console.WriteLine("B = " + b);
            Console.WriteLine("iloczyn A i B =" + a * b);
        }

       static int zwrocSume(int x, int y)
        {
            var suma = x + y;
            return suma;
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train101
{
    class BlackCat : Cat 
    {
        public BlackCat(string name) : base(name)
        {
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train102
{
    class GreekPizza : Pizza 
    {
        public GreekPizza()
        {
            this.cena = 10;
            this.nazwa = "GreakPizza";
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train101
{
    class Calculator
    {
        public int Sum(int x, int y)
        {
            var sum = y
            return x + y;
        }

        public int Roz(int x, int y)
        {
            return x - y;
        }
    }
}
<file_sep>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Train102
{
    class Calculator
    {
       

        public int Suma(int x, int y)
        {
            var suma = x + y;
            return suma;
        }

 

      

        public int Roznica(int x, int y)
        {
            var roznica = x - y;
            return roznica;
        }

        public int Iloczyn(int x, int y)
        {
            var iloczyn = x * y;
            return iloczyn;
        }

        public int Iloraz(int x, int y)
        {
            var iloraz = x / y;
            return iloraz;
        }
    }
}
