PIbd-21_Valitov_D.F_Sailboa.../Sailboat/Sailboat.cs

36 lines
1.2 KiB
C#
Raw Normal View History

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; }
/// <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, bool sail, bool extendedBody) :
base(speed, weight, bodyColor)
{
Sail = sail;
ExtendedBody = extendedBody;
}
}
}