Skip to content
Snippets Groups Projects
Commit 8b1fd09b authored by Debora's avatar Debora
Browse files

second commit: adicionando um construtor novo com valores default pra funcionario

parent 1b60c036
No related branches found
No related tags found
No related merge requests found
Pipeline #
...@@ -5,6 +5,19 @@ Funcionario::Funcionario(int identity, string role, string name, string doc_cpf, ...@@ -5,6 +5,19 @@ Funcionario::Funcionario(int identity, string role, string name, string doc_cpf,
id(identity), funcao(role), nome(name), cpf(doc_cpf), idade(age), tipo_sanguineo(blood_type), fator_RH(rh_factor), especialidade(specialty) id(identity), funcao(role), nome(name), cpf(doc_cpf), idade(age), tipo_sanguineo(blood_type), fator_RH(rh_factor), especialidade(specialty)
{} {}
//Contrutor com valores default
Funcionario::Funcionario(){
id = 0;
funcao = "-";
cpf = "-";
nome = "-";
idade = 0;
tipo_sanguineo = '-';
fator_RH = '-';
especialidade = "-";
}
int Funcionario::getId(){ int Funcionario::getId(){
return id; return id;
} }
...@@ -66,4 +79,4 @@ string Funcionario::getEspecialidade(){ ...@@ -66,4 +79,4 @@ string Funcionario::getEspecialidade(){
} }
void Funcionario::setEspecialidade(string specialty){ void Funcionario::setEspecialidade(string specialty){
especialidade = specialty; especialidade = specialty;
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ class Funcionario { ...@@ -19,7 +19,7 @@ class Funcionario {
public: public:
int getId(); int getId();
void setId(int identity); void setId(int identity);
string getFuncao(); string getFuncao();
void setFuncao(string role); void setFuncao(string role);
string getNome(); string getNome();
void setNome(string name); void setNome(string name);
...@@ -31,11 +31,12 @@ class Funcionario { ...@@ -31,11 +31,12 @@ class Funcionario {
void setTipo_sanguineo(char blood_type); void setTipo_sanguineo(char blood_type);
char getFator_RH(); char getFator_RH();
void setFator_RH(char rh_factor); void setFator_RH(char rh_factor);
string getEspecialidade(); string getEspecialidade();
void setEspecialidade(string specialty); void setEspecialidade(string specialty);
Funcionario(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty); Funcionario(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty);
Funcionario();
}; };
#endif #endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment