请高手给个详细代码,谢啦!

解决方案 »

  1.   

    这些东西....
    如果你是真的想学,你还是找个熟人手把手教你吧
    如果你是用来混学分或者其他的...还是找个愿意帮你的熟人吧
      

  2.   

    public class howlong {
    int holiday=0;
    public int more(int age,int workage, String ID)
    {
    if(age>=55)
    holiday+=5;
    if(workage>=10)
    holiday+=3;
    return holiday;
    }
    public static void main(String args[])
    {
    howlong h=new howlong();
    h.holiday=20;
    System.out.println("请输入员工的年龄,工龄,员工ID:");
    if(args.length<3)
    {
    System.out.println("请输入员工的年龄,工龄,员工ID:");
    System.exit(0);
    } int age=Integer.parseInt(args[0]);
    int workage=Integer.parseInt(args[1]);
    String ID=args[2];
    int holiday=h.more(age,workage,ID);
    System.out.println("员工"+ID+"的假期为:"+holiday);
    }
    }