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 EmergencyRoom_02
- {
- class Program
- {
- static void Main(string[] args)
- {
- Driver driver = new Driver("Петров");
- Console.WriteLine($"Журнал медицинского осмотра водителей.\n");
- driver.ShowVitalSigns();
- Console.ReadKey();
- }
- }
- class Driver
- {
- private string _surname;
- private int _systolicPressure;
- private int _diastolicPressure;
- private float _bodyTemperature;
- private int _alcohol;
- public Driver(string surname)
- {
- _surname = surname;
- _systolicPressure = 120;
- _diastolicPressure = 80;
- _bodyTemperature = 36.6f;
- _alcohol = 0;
- }
- public void ShowVitalSigns()
- {
- Console.WriteLine($"Водитель {_surname}\n" +
- $"Артериальное давление {_systolicPressure}/{_diastolicPressure} мм.рт.ст,\n" +
- $"Температура тела {_bodyTemperature},\n" +
- $"Алкоголь в крови {_alcohol} промилле.\n");
- }
- }
- }
Add Comment
Please, Sign In to add comment