43 lines
1.4 KiB
C#
43 lines
1.4 KiB
C#
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; }
|
||
|
||
public Color EdgeColor { get; private set; }
|
||
/// <summary>
|
||
/// Инициализация свойств
|
||
/// </summary>
|
||
/// <param name="speed">Скорость</param>
|
||
/// <param name="weight">Вес автомобиля</param>
|
||
/// <param name="bodyColor">Цвет кузова</param>
|
||
/// <param name="sail">Признак наличия паруса</param>
|
||
/// <param name="extendedBody">Признак наличия усиленного корпуса</param>
|
||
public Sailboat(int speed, float weight, Color bodyColor, Color edgeColor, bool sail, bool extendedBody) :
|
||
base(speed, weight, bodyColor)
|
||
{
|
||
EdgeColor = edgeColor;
|
||
Sail = sail;
|
||
ExtendedBody = extendedBody;
|
||
}
|
||
public void ChangeDopColor(Color newEdgeColor)
|
||
{
|
||
EdgeColor = newEdgeColor;
|
||
}
|
||
}
|
||
}
|