package Employ;

public class EmpDemo {
 public static void main(String[] args) {
  Emp emp =new Emp(1001,"张三丰",1000,200);
  Emp emp1 = new Emp(1002,"张无忌",2000,300);
  System.out.println(emp.Information());
  System.out.println(emp1.Information()); 
 } 
}
class Emp{
 private int  empno ;
 private String name ;
 private float salary ;
 private float bonus ;
 
 public Emp() {}
 
 public Emp(int empno, String name, float salary, float bonus) {
  super();
  this.empno = empno;
  this.name = name;
  this.salary = salary;
  this.bonus = bonus;
 }
 
 public int getEmpno() {
  return empno;
 }
 public void setEmpno(int empno) {
  this.empno = empno;
 }
 public String getName() {
  return name;
 }
 public void setName(String name) {
  this.name = name;
 }
 public float getSalary() {
  return salary;
 }
 public void setSalary(float salary) {
  this.salary = salary;
 }
 public float getBonus() {
  return bonus;
 }
 public void setBonus(float bonus) {
  this.bonus = bonus;
 }
 
 public float salary1(){   //月薪
  return  salary+bonus;
  
 }
 
 public float daily(){   //日薪
  return this.salary1()/30;
  
 }
 
 public float income(){   //年薪
  
  return this.salary1()*12;
 }
 
 public String Information(){
  return   "员工信息:\n"+"\tl- 员工编号:"+this.getEmpno()+"\n"+"\tl- 员工姓名"+this.getName()+"\n"+"\tl- 员工薪水:"+this.getSalary()+"\n"+"\tl- 奖金:"+this.getBonus()+
      "\n"+"\tl- 日薪:"+this.daily()+"\n"+"\tl- 月薪:"+this.salary1()+"\n"+"\tl- 年薪:"+this.income();
  
 }
 
 
 
}