using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication3
{
class student
{
protected string m_name;
protected string m_sex;
protected float m_tuition;
public student(string strname, string strsex, float ftuition)
{
m_name = strname;
m_sex = strsex;
m_tuition = ftuition;
}
virtual public void printfInfo()
{
Console.WriteLine(m_name + " " + m_sex + " " + m_tuition.ToString());
}
}
class graduate : student
{
protected string m_tutor;
public graduate(string strname, string strsex, float ftuition,string strtutor):base(strname,strsex,ftuition)
{
m_tutor = strtutor;
}
override public void printfInfo()
{
base.printfInfo();
Console.WriteLine("导师是"+m_tutor);
}
}
class Program
{
static void Main(string[] args)
{
student s = new student("张三", "男", 5000);
graduate g = new graduate("李四", "女", 9000, "王五");
s.printfInfo();
g.printfInfo();
Console.ReadLine();
}
}
}