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); } } }