2023-03-18 02:05:18 +04:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Sailboat
|
|
|
|
|
{
|
|
|
|
|
internal class Sailboat : Boat
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак наличия усиленного корпуса
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool ExtendedBody { get; private set; }
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Признак наличия паруса
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool Sail { get; private set; }
|
2023-04-21 00:50:18 +04:00
|
|
|
|
|
|
|
|
|
public Color EdgeColor { get; private set; }
|
2023-03-18 02:05:18 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Инициализация свойств
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="speed">Скорость</param>
|
|
|
|
|
/// <param name="weight">Вес автомобиля</param>
|
|
|
|
|
/// <param name="bodyColor">Цвет кузова</param>
|
|
|
|
|
/// <param name="sail">Признак наличия паруса</param>
|
|
|
|
|
/// <param name="extendedBody">Признак наличия усиленного корпуса</param>
|
2023-04-21 00:50:18 +04:00
|
|
|
|
public Sailboat(int speed, float weight, Color bodyColor, Color edgeColor, bool sail, bool extendedBody) :
|
2023-03-18 02:05:18 +04:00
|
|
|
|
base(speed, weight, bodyColor)
|
|
|
|
|
{
|
2023-04-21 00:50:18 +04:00
|
|
|
|
EdgeColor = edgeColor;
|
2023-03-18 02:05:18 +04:00
|
|
|
|
Sail = sail;
|
|
|
|
|
ExtendedBody = extendedBody;
|
|
|
|
|
}
|
2023-04-21 00:50:18 +04:00
|
|
|
|
public void ChangeDopColor(Color newEdgeColor)
|
|
|
|
|
{
|
|
|
|
|
EdgeColor = newEdgeColor;
|
|
|
|
|
}
|
2023-03-18 02:05:18 +04:00
|
|
|
|
}
|
|
|
|
|
}
|