Initial Commit (w/ Ch1Duck first implementation)
This commit is contained in:
17
Ch1Duck/Fly.cs
Normal file
17
Ch1Duck/Fly.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace Ch1Duck;
|
||||
|
||||
public interface IFlyBehaviour {
|
||||
void Fly();
|
||||
}
|
||||
|
||||
public class FlyWithWings: IFlyBehaviour {
|
||||
public void Fly() {
|
||||
Console.WriteLine("I'm flying!");
|
||||
}
|
||||
}
|
||||
|
||||
public class FlyNoWay: IFlyBehaviour {
|
||||
public void Fly() {
|
||||
Console.WriteLine("I can't fly");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user