From 3e35076c9d74b8cdc2f61c7fedd402716828fd5b Mon Sep 17 00:00:00 2001 From: XomRK Date: Thu, 15 Oct 2026 11:48:49 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20works/lab-06?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- works/lab-06 | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 works/lab-06 diff --git a/works/lab-06 b/works/lab-06 new file mode 100644 index 0000000..cb861ff --- /dev/null +++ b/works/lab-06 @@ -0,0 +1,57 @@ +using System; + +namespace PokemonApp +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("=== ПОКЕДЕКС ==="); + + Pokemon pokemon1 = new Pokemon("Пикачу", 5, 100); + Pokemon pokemon2 = new Pokemon("Сквиртл", 7, 90); + + pokemon1.ShowInfo(); + pokemon2.ShowInfo(); + + Console.ReadLine(); + } + } + + class Pokemon + { + private string name; + private int level; + private int hp; + + public string Name + { + get { return name; } + set { name = value; } + } + + public int Level + { + get { return level; } + set { level = value; } + } + + public int HP + { + get { return hp; } + set { hp = value; } + } + + public Pokemon(string name, int level, int hp) + { + this.name = name; + this.level = level; + this.hp = hp; + } + + public void ShowInfo() + { + Console.WriteLine($"Имя: {Name}, Уровень: {Level}, HP: {HP}"); + } + } +} \ No newline at end of file