马上加入IBC程序猿 各种源码随意下,各种教程随便看! 注册 每日签到 加入编程讨论群

C#教程 ASP.NET教程 C#视频教程程序源码享受不尽 C#技术求助 ASP.NET技术求助

【源码下载】 社群合作 申请版主 程序开发 【远程协助】 每天乐一乐 每日签到 【承接外包项目】 面试-葵花宝典下载

官方一群:

官方二群:

C#改错题,求大神指教啊

[复制链接]
查看3883 | 回复1 | 2015-1-13 14:39:23 | 显示全部楼层 |阅读模式
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();
        }
    }
}
剑弑 | 2015-9-5 11:08:38 | 显示全部楼层
你都没有把接口实现完,你的问题是不能运行吧http://www.ibcibc.com/thread-4250-1-1.html 你可以看看里面的内容,应该对你有帮助
*滑块验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则