23 lines
467 B
C#
Raw Normal View History

2021-09-14 12:31:36 +12:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DuckModel
{
2021-09-16 17:55:28 +12:00
public class MallardDuck : DuckBehaviour
2021-09-14 12:31:36 +12:00
{
public override void Display()
{
2021-09-16 17:55:28 +12:00
Console.WriteLine("I am a Mallard duck");
2021-09-14 12:31:36 +12:00
}
2021-09-16 17:55:28 +12:00
public MallardDuck()
2021-09-14 12:31:36 +12:00
{
base.SetFlyBehaviour(new FlyWithWings());
base.SetQuackBehaviour(new Quack());
}
}
}