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 ConsoleApp88
- {
- class Program
- {
- class Auditoria
- {
- public int number;
- public double area;
- private int hq_tech_num;
- public Auditoria(int n, double a, int hq)
- {
- this.number = n;
- this.area = a;
- this.hq_tech_num = hq;
- }
- public Auditoria()
- {
- number = 300;
- area = 200.0;
- hq_tech_num = 10;
- }
- public int hq_tech
- {
- get { return hq_tech_num; }
- set { if (value >= 1) hq_tech_num = value; }
- }
- public void outprint()
- {
- Console.WriteLine("Номер "+number);
- Console.WriteLine("Площадь "+area);
- Console.WriteLine("Количество дорогой техники "+hq_tech_num);
- }
- public void sit_places()
- {
- Console.WriteLine("Количество сидячих мест " + (int)(area / 1.2));
- }
- }
- static void Main(string[] args)
- {
- Auditoria z1 = new Auditoria(303, 765.5, 7);
- z1.sit_places();
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement