Skip to content

Conversation

@Veniamin1511
Copy link

Создайте абстрактный класс утка с методам swim, абстрактным методом display, и интерфейсы fly и quack. Показать пример использования класса наследующего абстрактный класс и реализующими интерфейсы.

Создайте абстрактный класс утка с методам swim, абстрактным методом display, и интерфейсы fly и quack. Показать пример использования класса наследующего абстрактный класс и реализующими интерфейсы.

public void Test2()
{
Duckinator utkonos = new Duckinator();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а если я хочу динамически сменить поведение полета?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тогда в интерфейсе Fly надо поменять на string Fly { get; set; }

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Секунду

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants