using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp17
{
public interface Charge
{
void charge();
}
public interface Play
{
void play();
}
public class Bus : Charge
{
public void charge()
{
Console.WriteLine("公共汽车:1元/张,不计公里数");
}
}
public class Taxi : Charge
{
public void charge()
{
Console.WriteLine("\n出租车:1.6元/公里,起价5元3公里");
}
}
public class Ciema : Charge, Play
{
public void charge()
{
Console.WriteLine("\n电影院:30元/张,凭学生证享受半价");
}
void Play.play()
{
Console.WriteLine("\n正在放映电影");
}
}
class Program
{
static void Main(string[] args)
{
Bus bus = new Bus();
bus.charge();
Taxi taxi = new Taxi();
taxi.charge();
Ciema ciama = new Ciema();
ciama.charge();
Play p = (Play)ciama;
p.play();
Console.ReadLine();
}
}
}