Advertisement
Guest User

class

a guest
Mar 20th, 2019
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 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 ConsoleApp88
  8. {
  9. class Program
  10. {
  11. class Auditoria
  12. {
  13. public int number;
  14. public double area;
  15. private int hq_tech_num;
  16.  
  17. public Auditoria(int n, double a, int hq)
  18. {
  19. this.number = n;
  20. this.area = a;
  21. this.hq_tech_num = hq;
  22. }
  23. public Auditoria()
  24. {
  25. number = 300;
  26. area = 200.0;
  27. hq_tech_num = 10;
  28. }
  29.  
  30. public int hq_tech
  31. {
  32. get { return hq_tech_num; }
  33. set { if (value >= 1) hq_tech_num = value; }
  34. }
  35.  
  36. public void outprint()
  37. {
  38. Console.WriteLine("Номер "+number);
  39. Console.WriteLine("Площадь "+area);
  40. Console.WriteLine("Количество дорогой техники "+hq_tech_num);
  41. }
  42.  
  43. public void sit_places()
  44. {
  45. Console.WriteLine("Количество сидячих мест " + (int)(area / 1.2));
  46. }
  47. }
  48. static void Main(string[] args)
  49. {
  50. Auditoria z1 = new Auditoria(303, 765.5, 7);
  51. z1.sit_places();
  52. Console.ReadKey();
  53. }
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement