骏Elephant 2016-04-12 07:57 采纳率: 46.2%
浏览 1554
已采纳

以下代码有需要修改的地方不

package salary;

/**

  • 薪酬标准
  • @author 吴家骏
  • */
    public class SalaryStandard {

    /** 管理的工资 */
    private double ManagedPayroll;

    /** 销售的工资 */
    private double SalesWage;

    /** 技术的工资 */
    private double TechnicalSalary;

    /** 行政的工资 */
    private double ExecutivePay;

    /** 公司总利润 */
    @SuppressWarnings("unused")
    private double GrossProfitOfCompany;

    /** 回款奖励 */
    private double CashReward;

    /** 业务利润提成 */
    private double BusinessProfitRoyalty;

    /** 技术人员加班提成 */
    private double OvertimePay;

    /**

    • 技术人员加班费 day 加班的天数 level 技术人员级别 */ private double OPay(int day, int level) { if (day != 0) { switch (level) { case 1: this.OvertimePay = day * 150; break; case 2: this.OvertimePay = day * 100; break; case 3: this.OvertimePay = day * 50; } } else { this.OvertimePay = 0; } return this.OvertimePay; }

    /**

    • 回款规则 .NoOfDay :为回款的天数 */ private double PaymentRules(int NoOfDay, double BProfit) { if (NoOfDay < 30) { this.CashReward = 0.005 * BProfit; } else if (NoOfDay >= 30 && NoOfDay < 45) { this.CashReward = 0.002 * BProfit; } else if (NoOfDay >= 60) { this.CashReward = -0.002 * BProfit; } return this.CashReward; }

    /**

    • 业务利润提成 .BProfit 业务所得利润 */ private double Commission(double BProfit) { if (BProfit <= 1000000) { this.BusinessProfitRoyalty = 0.02 * BProfit; } else if (BProfit > 1000000 && BProfit <= 5000000) { this.BusinessProfitRoyalty = 0.035 * BProfit; } else if (BProfit > 5000000) { this.BusinessProfitRoyalty = 0.055 * BProfit; } return this.BusinessProfitRoyalty; }

    /**

    • 部门经理的工资标准
    • GrossProfitOfCompany 公司利润
    • ManagerNum 经理人数
    • 既1级部门有几个部门经理,2级部门有几个部门经理,3级部门有几个部门经理 */ public double ManagerSalary(int level, double GrossProfitOfCompany , int ManagerNum) { switch (level) { case 1: this.ManagedPayroll = 9000 * 12 + GrossProfitOfCompany * 0.04 / 3 / ManagerNum; break; case 2: this.ManagedPayroll = 8000 * 12 + GrossProfitOfCompany * 0.04 / 3 / ManagerNum; break; case 3: this.ManagedPayroll = 7000 * 12 + GrossProfitOfCompany * 0.04 / 3 / ManagerNum; } return this.ManagedPayroll; }

    /**

    • 销售部人员的工资标准 .分级别: 1级为销售部副经理, 2级为销售部员工, 3级为销售部试用期员工 NoOfDay 回款天数 BProfit
    • 业务所得利润 */ public double SalesSalary(int level, int NoOfDay, double BProfit) { if (level == 3) { this.SalesWage = 2000 + this.PaymentRules(NoOfDay, BProfit) + this.Commission(BProfit); } else { switch (level) { case 1: this.SalesWage = 3000 + this.PaymentRules(NoOfDay, BProfit) + this.Commission(BProfit); break; case 2: this.SalesWage = 2200 + this.PaymentRules(NoOfDay, BProfit) + this.Commission(BProfit); } } return this.SalesWage; }

    /**

    • 技术人员工资标准 level 技术人员级别:1级为高级工程师 ,2级为中级工程师 , 3级为初级技术人员 day 加工天数
      */
      public double engineer(int level, int day) {
      switch (level) {
      case 1:
      this.TechnicalSalary = 15000 + this.OPay(day, level);
      break;
      case 2:
      this.TechnicalSalary = 10000 + this.OPay(day, level);
      break;
      case 3:
      this.TechnicalSalary = 5000 + this.OPay(day, level);
      }

      return this.TechnicalSalary;
      }

    /**

    • 行政人员工资标准
    • level 行政人员等级
    • 1级为行政副经理,2级为行政人员,3为试用期人员 * */ public double AdminiSalary( int level ){ switch(level){ case 1: this.ExecutivePay = 2300; case 2: this.ExecutivePay = 2000; case 3: this.ExecutivePay = 2000 * 0.8; } return this.ExecutivePay; }

}

  • 写回答

1条回答 默认 最新

  • threenewbee 2016-04-12 10:03
    关注

    编译你的程序,如果程序无法编译出错,那么肯定需要修改。
    程序如果能够运行,但是结果不对,也需要修改。
    程序能够运行,结果正确,但是和用户的需求不一致,也需要修改。
    程序能够运行,结果正确,和用户需求一致,但是考虑到代码性能和可读性的优化完善的需要,也需要修改。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效
  • ¥15 再不同版本的系统上,TCP传输速度不一致
  • ¥15 高德地图2.0 版本点聚合中Marker的位置无法实时更新,如何解决呢?
  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题