Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp19
- {
- public class Tacka
- {
- private string imeTacke;
- private double x;
- private double y;
- public string ImeTacke { get => ImeTacke; set => ImeTacke = value; }
- public double X { get => x; set => x = value; }
- public double Y { get => y; set => y = value; }
- public double Udaljenost(Tacka T1,Tacka T2)
- {
- double ud = Math.Sqrt(((T1.x - T2.x) * (T1.x - T2.x)) + ((T1.y - T2.y) * (T1.y - T2.y)));
- return (ud);
- }
- public Tacka()
- {
- this.imeTacke = ImeTacke;
- this.x = X;
- this.y = Y;
- }
- }
- public class Poligon
- {
- private string imePoligona;
- private static int brTemena;
- private Tacka[] temena = new Tacka[brTemena];
- private static int brPoligona;
- public string ImePoligona { get => ImePoligona; set => ImePoligona = value; }
- public static int BrTemena { get => BrTemena; set => BrTemena = value; }
- private Tacka[] Temena { get => Temena; set => Temena = value; }
- public static int BrPoligona { get => BrPoligona; set => BrPoligona = value; }
- public Poligon()
- {
- brTemena = 0;
- }
- public Poligon(int BrTemena)
- {
- brTemena = BrTemena;
- }
- public Poligon(Poligon P)
- {
- this.imePoligona = P.imePoligona;
- this.temena = P.temena;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement