-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmpleado.cpp
More file actions
37 lines (36 loc) · 1.13 KB
/
Copy pathEmpleado.cpp
File metadata and controls
37 lines (36 loc) · 1.13 KB
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
#include"Persona.cpp"
#include<iostream>
using namespace std;
class Empleado : Persona{
//atributos
private : string puesto;
int codigo_empleado;
//constructor
public :
Empleado(){
}
Empleado(string nom, string ape, string dir, string f, int tel, string ps, int cod) : Persona(nom,ape,dir,f,tel){
codigo_empleado = cod;
puesto = ps
}
//set (modificar los atributos de una clase)
void setCodigo(int cod){codigo_empleado = cod;}
void setNombres(string nom){nombres = nom;}
void setApellidos(string ape){apellidos = ape;}
void setPuesto(string ps){puesto = ps;}
void setDireccion(string dir){direccion = dir;}
void setTelefono(int tel){telefono = tel;}
void setFn(string f){fn = f;}
//get (mostrar los atrtibutos de una clase)
int getCodigo(){return codigo;}
string getNombres(){return nombres;}
string getApellidos(){return apellidos;}
string getPuesto(){return puesto;}
string getDireccion(){return direccion;}
int getTelefono(){return telefono;}
string getFn(){return fn;}
void agregar(){
cout<<"_____________________________"<<endl;
cout<<codigo<<";"<<puesto<<";"<<nombres<<","<<apellidos<<","<<direccion<<","<<fn<<","<<telefono<<endl;
}
};