View difference between Paste ID: gzdhLcxw and 5PR5MPcy
SHOW: | | - or go back to the newest paste.
1
using System;
2
 
3
namespace Kalucki4_5
4
{
5
    class Program
6
    {
7
        static void Main(string[] args)
8
        {
9
			Kwadrat kw = new Kwadrat(5);
10
            Console.WriteLine(kw.ToString());
11
        }
12
    }
13
 
14
    public interface IFigura
15
    {
16
        int Obwod { get; }
17
        int Pole { get; }
18
    }
19
 
20
    public class Kwadrat : IFigura
21
    {
22
        private int dlBoku;
23
24-
		public Kwadrat(int bokKwadratu)
24+
		public Kwadrat(int dlBoku)
25
	    {
26-
        	dlBoku = bokKwadratu;
26+
        	this.dlBoku = dlBoku;
27
    	}
28
 
29
        public int Obwod 
30
		{
31-
            get 
31+
            get => 4 * dlBoku;
32-
			{
32+
33-
                return 4 * dl_boku_kwadrat;
33+
34-
            } 
34+
35
		{
36
            get => dlBoku * dlBoku;
37
		}
38
39-
            get 
39+
40-
			{
40+
41-
                return dl_boku_kwadrat * dl_boku_kwadrat;
41+
42-
            }
42+
43
    }
44
}