From d5f6a0415262b6c493e814bc68e1aaf19e190b05 Mon Sep 17 00:00:00 2001 From: Programmist73 Date: Sat, 3 Dec 2022 17:52:39 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=208-=D0=B9?= =?UTF-8?q?=20=D0=BB=D0=B0=D0=B1=D0=BE=D1=80=D0=B0=D1=82=D0=BE=D1=80=D0=BD?= =?UTF-8?q?=D0=BE=D0=B9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Airbus/Airbus/PlaneCompareByColor.cs | 10 ++++++++++ Airbus/Airbus/PlaneCompareByType.cs | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Airbus/Airbus/PlaneCompareByColor.cs b/Airbus/Airbus/PlaneCompareByColor.cs index 388d7c3..77538ef 100644 --- a/Airbus/Airbus/PlaneCompareByColor.cs +++ b/Airbus/Airbus/PlaneCompareByColor.cs @@ -43,6 +43,16 @@ namespace Airbus return 1; } + if(xPlane.GetPlane.Airbus.Speed != yPlane.GetPlane.Airbus.Speed) + { + return 1; + } + + if (xPlane.GetPlane.Airbus.Weight != yPlane.GetPlane.Airbus.Weight) + { + return 1; + } + var xEntity = xPlane.GetPlane.Airbus; var yEntity = yPlane.GetPlane.Airbus; var colorCompare = xEntity.CorpusColor.Name.CompareTo(yEntity.CorpusColor.Name); diff --git a/Airbus/Airbus/PlaneCompareByType.cs b/Airbus/Airbus/PlaneCompareByType.cs index 1c9b86b..3524e2f 100644 --- a/Airbus/Airbus/PlaneCompareByType.cs +++ b/Airbus/Airbus/PlaneCompareByType.cs @@ -61,7 +61,7 @@ namespace Airbus return speedCompare; } - return xPlane.GetPlane.Airbus.Speed.CompareTo(yPlane.GetPlane.Airbus.Speed); + return xPlane.GetPlane.Airbus.Weight.CompareTo(yPlane.GetPlane.Airbus.Weight); } } }