Advertisement
OldBeliver

Classes_ver01

Apr 6th, 2021 (edited)
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.50 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 EmergencyRoom_01
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Patient patient = new Patient();
  14.  
  15.             Console.WriteLine($"Жизненно важные показатели пациента\n");
  16.             patient.ShowVitalSigns();
  17.  
  18.             Console.ReadKey();
  19.         }
  20.     }
  21.  
  22.     class Patient
  23.     {
  24.         public int HeatRate;
  25.         public int SystolicPressure;
  26.         public int DiastolicPresure;
  27.         public int RespiratoryRate;
  28.         public float BodyTemperature;
  29.         public string Cardiogram;
  30.  
  31.         public Patient()
  32.         {
  33.             HeatRate = 80;
  34.             SystolicPressure = 120;
  35.             DiastolicPresure = 80;
  36.             RespiratoryRate = 12;
  37.             BodyTemperature = 36.6f;
  38.             Cardiogram = "синусовый ритм";
  39.         }
  40.  
  41.         public void ShowVitalSigns()
  42.         {
  43.             Console.WriteLine($"Температура тела {BodyTemperature} градусов\n" +
  44.                 $"Частота сердечных сокращений {HeatRate} ударов в минуту\n" +
  45.                 $"Частота дыхания {RespiratoryRate} в минуту\n" +
  46.                 $"Артериальное давление {SystolicPressure}/{DiastolicPresure} мм.рт.ст.\n" +
  47.                 $"ЭКГ {Cardiogram}");
  48.         }
  49.     }
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement