Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.85 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Kalucki4_5
  4. {
  5.  
  6.     class Program
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             Console.ReadKey();
  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.  
  23.         private int dl_boku_kwadrat;
  24.         public int obwod_kwadrat;
  25.         public int pole_kwadrat;
  26.  
  27.         public int Obwod {
  28.             get {
  29.                 obwod_kwadrat = 4 * dl_boku_kwadrat;
  30.                  return 0;
  31.             } }
  32.  
  33.  
  34.         public int Pole {
  35.             get {
  36.                 pole_kwadrat = dl_boku_kwadrat * dl_boku_kwadrat;
  37.                 return 0;
  38.             }}
  39.  
  40.  
  41.         public override string ToString()
  42.         {
  43.             return dl_boku_kwadrat.ToString();
  44.         }
  45.  
  46.  
  47.     }
  48.  
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement