成都创新互联网站制作重庆分公司

公司雇员工资java代码 java工资表代码

java求解释一下代码

pane也就是JPanel 而这个panel就是JPanel的实例对象,

海城ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18980820575(备注:SSL证书合作)期待与您的合作!

.class也就是指向JPanel本身。

.getResource也就是读取文件路径。

共同交流哦

java编程 定义一个类描述公司雇员

public class Employee {

private int id;

private String name;

private double salary;

public Employee() {

this.id = 0;

this.name = null;

this.salary = 0.0;

}

public Employee(int id, String name, double salary) {

super();

this.id = id;

this.name = name;

this.salary = salary;

}

public int getId() {

return id;

}

public void setId(int id) {

this.id = id;

}

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public double getSalary() {

return salary;

}

public void setSalary(double salary) {

this.salary = salary;

}

}

java程序设计,多态在工资系统中的应用。请将【代码一】到【代码六】用为Java源代码填写

代码一:

private Double weeklySalary;

代码二:

public void setWeeklySalary(Double weeklySalary){

this.weeklySalary=weeklySalary;

}

代码三:

private Double salary;

private Integer piece;

public PieceWorker (String name,Integer p,Double s) {

super(name);

setSalary(s);

setPiece(p);

}

public void setPiece(Integer p){

this.piece=p;

}

public void setSalary(Double s){

this.salary=s;

}

public double earnings() {

return piece*salary;

}

代码四:

private Double salary;

private Integer hour;

public PieceWorker (String name,Integer h,Double s) {

super(name);

setSalary(s);

setHour(h);

}

public void setHour(Integer h){

this.hour=h;

}

public void setSalary(Double s){

this.salary=s;

}

public double earnings() {

return h*salary;

}


网站名称:公司雇员工资java代码 java工资表代码
网页地址:http://cxhlcq.com/article/ddepeis.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部