雇佣java代码 java代码工程师招聘

java 问题求解 。。。定义一个表示雇员的类Employee,成员包括:姓名,工资…………public class Employee {
private String name;
private Float pay;
public Employee() {
}
public Employee(String name) {
this.name=name;
}
public Employee(Float pay) {
this.pay=pay;
}
public Employee(String name,Float pay) {
this.pay=pay;
this.name=name;
}
public void showEmployee(Employee e){
System.out.println(e.name "的工资:" e.pay);
}
}
用java编写一个程序:某个公司有3不同的雇员,分为A、B、C3个级别 。。package com.lgy.question;
public abstract class Employee {
public abstract double pay();
}
package com.lgy.question;
/**
* @author LONGGUOYOU
*
* A类员工工资 APAY 变动就改2000.00处
*
*/
public class AgradeEmployee extends Employee {
private static final double APAY = 2000.00;
private int peopleANumber;
public AgradeEmployee(int numbers) {
// TODO Auto-generated constructor stub
this.peopleANumber = numbers;
}
@Override
public double pay() {
// TODO Auto-generated method stub
return APAY * peopleANumber;
}
}
package com.lgy.question;
/**
* @author LONGGUOYOU
*
* B类员工工资 BPAY 变动就改1000.00处
*
*/
public class BgradeEmployee extends Employee {
private static final double BPAY = 1000.00;
private int peopleBNumber;
public BgradeEmployee(int numbers) {
// TODO Auto-generated constructor stub
this.peopleBNumber = numbers;
}
@Override
public double pay() {
// TODO Auto-generated method stub
return BPAY * peopleBNumber;
}
}
package com.lgy.question;
/**
* @author LONGGUOYOU
*
* C类员工工资 CPAY 变动就改2200.00处
*
*/
public class CgradeEmployee extends Employee {
private static final double CPAY = 2200.00;
private int peopleCNumber;
public CgradeEmployee(int numbers) {
// TODO Auto-generated constructor stub
this.peopleCNumber = numbers;
}
@Override
public double pay() {
// TODO Auto-generated method stub
return CPAY * peopleCNumber;
}
}
package com.lgy.question;
import javax.swing.JOptionPane;
/**
*
* @author LONGGUOYOU
*
* /
public class Company {
/**
* 声明总工资
*/
public static double sumPay;
/**
* 求总共需要支付的工资
*/
public void sumPay(){
/**
* 以下是接受每个月人数的变动
*/
String anumbers = JOptionPane.showInputDialog("请输入A类员工人数:");
int Anumbers = Integer.parseInt(anumbers);
String bnumbers = JOptionPane.showInputDialog("请输入B类员工人数:");
int Bnumbers = Integer.parseInt(bnumbers);
String cnumbers = JOptionPane.showInputDialog("请输入C类员工人数:");
int Cnumbers = Integer.parseInt(cnumbers);
//将AgradeEmployee,BgradeEmployee,CgradeEmployee放进数组
final Employee[] employees = { new AgradeEmployee(Anumbers),
new BgradeEmployee(Bnumbers), new CgradeEmployee(Cnumbers) };
for (int i = 0; iemployees.length; i) {
sumPay= employees[i].pay();
}
//对话框给出
JOptionPane.showMessageDialog(null,"总共需要支付工资:"sumPay);
//控制台打印出来
System.out.println("总共需要支付工资:"sumPay);
}
public static void main(String[] args) {
new Company().sumPay();
}
}
本人菜鸟一个,只供参考,大虾们请多多指教!
JAVA创建5个雇员对象,设计程序找出五个雇员对象中年龄最大的员工,并将该员工的信息输出到控制台的代码 。class Employee {//雇员类
int age;
//所有信息
}
class Test{
List list = new ArrayList();
//声明创建五个对象
//比如Employee a = new Employee();
//......a.age = 30;
list.add(a);
//五个对象都加入List集合中
//然后遍历取出雇佣java代码,比较年龄
for(int i=0;ilist.size;i)
{
//取出年龄最大雇佣java代码的对象e
}
//输出e雇佣java代码的所有信息
System.out.println(e.age"其雇佣java代码他信息");
}
一、java编写一个雇员类:1.属性:员工编号,姓名 , 职位,工资,2.方法包括:输出基本信息 , 计算class Worker {
private String no;
private String name;
private String job;
private double wages;
public Worker() {
super();
}
public Worker(String no, String name, String job, double wages) {
super();
this.no = no;
this.name = name;
this.job = job;
this.wages = wages;
}
public String getWorkerInfo() {
return "员工编号:"no";姓名:"name";职位:"job";工资:"wages;
}
public double getPackage() {
return wages * 12;
}
}
class Salesman extends Worker {
private double bonus;
public Salesman() {
super();
}
public Salesman(double bonus) {
super();
this.bonus = bonus;
}
@Override
public String getWorkerInfo() {
return super.getWorkerInfo()";奖金:"bonus;
}
@Override
public double getPackage() {
return super.getPackage()bonus;
}
}
Java问题编写一个程序实现一个雇员的管理 。雇员类数据成员有雇员编号,姓名,性别,年龄,ID为QQ号尾数是7那人是骗子,拿了钱就拉黑,本人已被骗 , 好心来提醒 。注意不要被骗 。
JAVA定义一个雇员类Employee 。雇员类中包含三个数据成员,其中name和id为实例成员,class Employee
{
private String id;
private String name;
public static int employeeCount=35;
public String getId(){return this.id;}
public void setId(String id){this.id=id;}
public String getName(){return this.name;}
public void setName(String id){this.name=name;}
}
【雇佣java代码 java代码工程师招聘】雇佣java代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java代码工程师招聘、雇佣java代码的信息别忘了在本站进行查找喔 。

    推荐阅读