Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public interface IVehicle{
- void Drive();
- void Fly();
- }
- public class MultiFunctionalCar : IVehicle{
- public void Drive(){
- Console.WriteLine("Drive a multifunctional car");
- }
- public void Fly(){
- Console.WriteLine("Fly a multifunctional car");
- }
- }
- public class Car : IVehicle{
- public void Drive(){
- Console.WriteLine("Driving a car");
- }
- public void Fly(){
- throw new NotImplementedException();
- }
- }
- public class Airplane : IVehicle{
- public void Drive(){
- throw new NotImplementedException();
- }
- public void Fly(){
- Console.WriteLine("Flying a plane");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement