add comment to clone method
This commit is contained in:
@@ -58,6 +58,10 @@ public class Lawnmower : ElectricTool
|
||||
_fuelLevel = _fuelCapacity;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Клонирует газонокосилку
|
||||
/// </summary>
|
||||
/// <returns>Клоннированная газонокосилка</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
var lawnmower = new Lawnmower(Name, Material, Weight, Power, FuelCapacity)
|
||||
|
||||
@@ -79,6 +79,10 @@ public class Scissors : ManualTool
|
||||
return accuracy;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Клонирует ножницы
|
||||
/// </summary>
|
||||
/// <returns>Клоннированные ножницы</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
return new Scissors(Name, Material, Weight, HandleLength, BladeSize);
|
||||
|
||||
@@ -37,6 +37,10 @@ public class Scythe : ManualTool
|
||||
_bladeType = parNewBladeType;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Клонирует косу
|
||||
/// </summary>
|
||||
/// <returns>Клоннированный коса</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
return new Scythe(Name, Material, Weight, HandleLength, BladeType);
|
||||
|
||||
@@ -73,5 +73,9 @@ public abstract class Tool : ICloneable
|
||||
return $"Инструмент: {Name}, Материал: {Material}, Вес: {Weight}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Клонирует инструмент
|
||||
/// </summary>
|
||||
/// <returns>Клонированный инструмент</returns>
|
||||
public abstract object Clone();
|
||||
}
|
||||
|
||||
@@ -36,6 +36,10 @@ public class Trimmer : ElectricTool
|
||||
_mode = parMode;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Клонирует триммер
|
||||
/// </summary>
|
||||
/// <returns>Клоннированный триммер</returns>
|
||||
public override object Clone()
|
||||
{
|
||||
var trimmer = new Trimmer(Name, Material, Weight, Power)
|
||||
|
||||
Reference in New Issue
Block a user