This commit is contained in:
2026-02-17 06:46:24 +03:00
commit 571d6cd8a5
6 changed files with 559 additions and 0 deletions

31
Program.cs Normal file
View File

@@ -0,0 +1,31 @@
namespace Practice6_Presnyakov
{
internal class Program
{
static void Main(string[] args)
{
CheatSuspectAccount cheater = new CheatSuspectAccount("NeoSniper", 72, 12);
Console.WriteLine("=== Вызовы через ссылку производного типа (CheatSuspectAccount) ===");
cheater.Login();
cheater.ReportPlayer("Innocent");
cheater.PerformCheck();
cheater.ApplyPenalty();
cheater.ShowStatus();
cheater.WriteLog(":D");
Console.WriteLine();
Console.WriteLine("=== Разницы override vs new (Mortal Kombat) ===");
PlayerAccount asBase = cheater;
asBase.PerformCheck();
asBase.ApplyPenalty();
asBase.ShowStatus();
asBase.WriteLog("Based :p");
Console.WriteLine();
}
}
}