-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEmpleado.java
64 lines (44 loc) · 1.25 KB
/
Empleado.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
public abstract class Empleado
{
String name, lastName, id;
double salary;
int join_date;
//Constructores
public Empleado(){}
public Empleado(String name, String lastName, String id, int join_date, double salary)
{
setName(name);
setLastName(lastName);
setId(id);
setJoinDate(join_date);
setSalary(salary);
}
//Getters and setters
void setName(String name)
{ this.name = name; }
void setLastName(String lastName)
{ this.lastName = lastName; }
void setId(String id)
{ this.id = id; }
void setSalary(double salary)
{ this.salary = salary; }
void setJoinDate(int join_date)
{ this.join_date = join_date; }
String getName()
{ return name; }
String getLastName()
{ return lastName; }
String getId()
{ return id; }
double getSalary()
{ return salary; }
int getJoinDate()
{ return join_date; }
int calculaTiempoDeEmpleo(int join_date)
{
int tiempo = 2018 - join_date;
return tiempo;
}
// public abstract void imprimeDatos();
public abstract void obtenerSalario();
}// Fin de la clase Empleado