C#改错题,求大神指教啊
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace t2
{
interface pepole
{
float salary1
{
get;
set;
}
float salary2
{
get;
set;
}
float totalsalary();
float print();
}
class teacher : pepole
{
string name;
float basesalary;
float prizesalary;
teacher(string na, float s1, float s2)
{
name = na;
basesalary = s1;
prizesalary = s2;
}
public float salary1
{
get
{
return basesalary;
}
set
{
basesalary = value;
}
}
}
class Program
{
static void Main(string[] args)
{
teacher t1 = new teacher("wangm",4000.5f,3805.5f);
t1.totalsalary();
t1.print();
}
}
}
你都没有把接口实现完,你的问题是不能运行吧http://www.ibcibc.com/thread-4250-1-1.html 你可以看看里面的内容,应该对你有帮助
页:
[1]