Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
1
Indexable
Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LAB_2._1
{
    class Figura_Plaska
    {
        int numer;
        int sx, sy;
        double pole;
        double obwod;

        public Figura_Plaska(int nr, int sx, int sy)
        {
            numer = nr;
            this.sx = sx;
            this.sy = sy;
        }

        public void Przesun_Figure(int dx, int dy)
        {
            sx += dx;
            sy += dy;
        }

        public void Pokaz_Figure()
        {
            Console.WriteLine("Numer : " + numer);
            Console.WriteLine("Polozenie figury : {0} , {1}", sx, sy);
            Console.WriteLine("Pole figury = " + pole);
            Console.WriteLine("Obwod figury = " + obwod);
            Console.WriteLine("::::::::::::::::::::::::");
        }
    }
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Zjazd nr 3");
            Figura_Plaska fig1;
            fig1 = new Figura_Plaska(1, 5, 4);
            fig1.Pokaz_Figure();

            Console.WriteLine("Koniec");
            Console.ReadKey();
        }
    }
}