Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp19
  8. {
  9. public class Tacka
  10. {
  11. private string imeTacke;
  12. private double x;
  13. private double y;
  14.  
  15. public string ImeTacke { get => ImeTacke; set => ImeTacke = value; }
  16. public double X { get => x; set => x = value; }
  17. public double Y { get => y; set => y = value; }
  18.  
  19. public double Udaljenost(Tacka T1,Tacka T2)
  20. {
  21. double ud = Math.Sqrt(((T1.x - T2.x) * (T1.x - T2.x)) + ((T1.y - T2.y) * (T1.y - T2.y)));
  22. return (ud);
  23. }
  24.  
  25. public Tacka()
  26. {
  27. this.imeTacke = ImeTacke;
  28. this.x = X;
  29. this.y = Y;
  30. }
  31. }
  32. public class Poligon
  33. {
  34. private string imePoligona;
  35. private static int brTemena;
  36. private Tacka[] temena = new Tacka[brTemena];
  37. private static int brPoligona;
  38.  
  39. public string ImePoligona { get => ImePoligona; set => ImePoligona = value; }
  40. public static int BrTemena { get => BrTemena; set => BrTemena = value; }
  41. private Tacka[] Temena { get => Temena; set => Temena = value; }
  42. public static int BrPoligona { get => BrPoligona; set => BrPoligona = value; }
  43.  
  44. public Poligon()
  45. {
  46. brTemena = 0;
  47. }
  48. public Poligon(int BrTemena)
  49. {
  50. brTemena = BrTemena;
  51. }
  52. public Poligon(Poligon P)
  53. {
  54. this.imePoligona = P.imePoligona;
  55. this.temena = P.temena;
  56. }
  57. }
  58. class Program
  59. {
  60. static void Main(string[] args)
  61. {
  62.  
  63. }
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement