标题:可能关于格式问题,我找不出错误
只看楼主
a_choat
Rank: 2
等 级:论坛游民
帖 子:60
专家分:44
注 册:2011-11-4
结帖率:83.33%
 问题点数:0 回复次数:1 
可能关于格式问题,我找不出错误
程序代码:
import java.util.Calendar;

public class Object {
    
    public interface AddtionalSalary {
        public abstract int getAddtionalSalary ();
    }
    
     public class Employee {
        String EmpName;//员工姓名
        int Month;//员工生日月份
        public int getAddtionalSalary (){
            return 0;//
        }
        void setMonth(int Month){
            this.Month=Month;
        }
        int getMonth(){
            return Month;
        }
        public int getSalary (int Month){
            Calendar ca = Calendar.getInstance();
            int MonthNow = ca.get(Calendar.MONTH);
            this.Month = Month;
            //  实现生日加工资 100
            int salaryBir=0;
            if(Month==MonthNow)  salaryBir += 100;
            else salaryBir = 0;
            
            return salaryBir;
        }
    }
    
    class SalariedEmployee extends Employee{
        int MonthlyPay;
        
    }
    
    class HourlyEmployee extends Employee{
        int HourlyPay;
        int HourTime;
    }
    
    class SalesEmployee extends Employee {
        int Saleroom;
        int SalesPercentage;
    }
    
    class BasePlusSalesEmployee extends SalesEmployee {
        int BaseSalary;
    }
    
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        
        Employee Em = new Employee();
        Em.setMonth(10);
        System.out.println(getMonth());
        
    }

}

最后的调用System.out.println(getMonth());一直说没创建getMonth类,还没学精,请指点一二,谢谢
搜索更多相关主题的帖子: Object 姓名 
2012-10-15 00:13
a_choat
Rank: 2
等 级:论坛游民
帖 子:60
专家分:44
注 册:2011-11-4
得分:0 
额额额额。。。终于找到了。。。。果然要细心啊。。。程序员们不用帮我看了。。这么一长串垃圾也不好意思打扰。。
2012-10-15 00:25



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-383207-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.020441 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved