CSharp · Console
using System;
public class Program
{
public static void Main()
{
IRobot r = new Robot();
r.SaySomething();
}
}
public class Machine
{
public void SaySomething()
{
Console.WriteLine("This is");
}
}
public interface IRobot
{
void SaySomething();
}
public class Robot : Machine, IRobot
{
}