diff --git a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/AbstractCompany.cs b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/AbstractCompany.cs index 85edb53..0753208 100644 --- a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/AbstractCompany.cs +++ b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/AbstractCompany.cs @@ -48,7 +48,7 @@ public abstract class AbstractCompany _pictureWidth = picWidth; _pictureHeight = picHeight; _collection = collection; - _collection.SetMaxCount = GetMaxCount; + _collection.MaxCount = GetMaxCount; } /// diff --git a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs index e6c0b2c..e8c5ae5 100644 --- a/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs +++ b/ProjectSportCar/ProjectSportCar/CollectionGenericObjects/ListGenericObjects.cs @@ -1,4 +1,5 @@ -namespace ProjectSportCar.CollectionGenericObjects; + +namespace ProjectSportCar.CollectionGenericObjects; /// /// Параметризованный набор объектов @@ -19,7 +20,20 @@ public class ListGenericObjects : ICollectionGenericObjects public int Count => _collection.Count; - public int SetMaxCount { set { if (value > 0) { _maxCount = value; } } } + public int MaxCount + { + get => _maxCount; + set + { + if (value > 0) + { + _maxCount = value; + } + } + } + + + public CollectionType GetCollectionType => throw new NotImplementedException(); /// /// Конструктор @@ -56,4 +70,9 @@ public class ListGenericObjects : ICollectionGenericObjects // TODO удаление объекта из списка return true; } + + public IEnumerable GetItems() + { + throw new NotImplementedException(); + } } \ No newline at end of file diff --git a/ProjectSportCar/ProjectSportCar/Drawnings/DrawningCar.cs b/ProjectSportCar/ProjectSportCar/Drawnings/DrawningCar.cs index 570b5b6..e3f5302 100644 --- a/ProjectSportCar/ProjectSportCar/Drawnings/DrawningCar.cs +++ b/ProjectSportCar/ProjectSportCar/Drawnings/DrawningCar.cs @@ -84,6 +84,15 @@ public class DrawningCar EntityCar = new EntityCar(speed, weight, bodyColor); } + /// + /// Конструктор + /// + /// Класс-сущность + public DrawningCar(EntityCar car) : this() + { + // TODO продумать логику + } + /// /// Конструктор для наследников /// diff --git a/ProjectSportCar/ProjectSportCar/Drawnings/DrawningSportCar.cs b/ProjectSportCar/ProjectSportCar/Drawnings/DrawningSportCar.cs index 9bf7210..59bc69b 100644 --- a/ProjectSportCar/ProjectSportCar/Drawnings/DrawningSportCar.cs +++ b/ProjectSportCar/ProjectSportCar/Drawnings/DrawningSportCar.cs @@ -20,7 +20,16 @@ public class DrawningSportCar : DrawningCar public DrawningSportCar(int speed, double weight, Color bodyColor, Color additionalColor, bool bodyKit, bool wing, bool sportLine) : base(110, 60) { EntityCar = new EntitySportCar(speed, weight, bodyColor, additionalColor, bodyKit, wing, sportLine); - } + } + + /// + /// Конструктор + /// + /// Класс-сущность + public DrawningSportCar(EntityCar car) : base(110, 60) + { + // TODO продумать логику + } public override void DrawTransport(Graphics g) { diff --git a/ProjectSportCar/ProjectSportCar/Entities/EntitySportCar.cs b/ProjectSportCar/ProjectSportCar/Entities/EntitySportCar.cs index 4972c1c..d039499 100644 --- a/ProjectSportCar/ProjectSportCar/Entities/EntitySportCar.cs +++ b/ProjectSportCar/ProjectSportCar/Entities/EntitySportCar.cs @@ -44,4 +44,15 @@ public class EntitySportCar : EntityCar } //TODO Прописать метод + + /// + /// Создание объекта из массива строк + /// + /// + /// + public static EntitySportCar? CreateEntitySportCar(string[] strs) + { + // TODO продумать логику + return null; + } } \ No newline at end of file