using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
public interface IStudent
{
void StudyBase();
}
public interface IEmployee
{
void Work();
}
public interface IInforStudent : IStudent
{
void StudySpecial();
}
public class InfoStudent : IEmployee,IInforStudent
{
public void Work()
{
Console.WriteLine("你的工作任務必須完成");
}
public void StudySpecial()
{
Console.WriteLine("你是計算機專業的學生,必須學習");
}
}
class Program
{
static void Main(string[] args)
{
InfoStudent student = new InfoStudent();
student.Work();
student.StudySpecial();
}
}
}
public class InfoStudent : IEmployee,IInforStudent
{
public void StudyBase()
{
// ...
}
public void Work()
{
Console.WriteLine("你的工作任務必須完成");
}
public void StudySpecial()
{
Console.WriteLine("你是計算機專業的學生,必須學習");
}
}