diff --git a/anfibio.cpp b/anfibio.cpp deleted file mode 100644 index 9870a4b7dd7abf708c38d154dd363b0ee117abc9..0000000000000000000000000000000000000000 --- a/anfibio.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#include "anfibio.h" - -/** -* @brief Construtor cria um animal do tipo AnfÃbio, que toma Animal como classe pai a herdar seus atributos -* @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, -* sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, -* baptism - nome de batismo do animal, vet - veterinário associado ao animal, -* caretaker - tratador associado ao animal, total_changes - número de mudas do animal, -* last_change - ultima muda do animal -*/ - -Anfibio::Anfibio(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int total_changes, string last_change): - - Animal(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker), - - total_mudas(total_changes), ultima_muda(last_change){} - -/** -* @brief Funcao que retorna o número total de mudas -* @return Número de mudas total -*/ -int Anfibio::getTotal_mudas(){ - return total_mudas; -} - -/** -* @brief Funcao que modifica o número total de mudas -* @param total_changes Numero de mudas total -*/ - -void Anfibio::setTotal_mudas(int total_changes){ - total_mudas = total_changes; -} - -/** -* @brief Funcao que retorna a última muda do animal -* @return Última muda -*/ -string Anfibio::getUltima_muda(){ - return ultima_muda; -} - - -/** -* @brief Funcao que modifica a ultima muda -* @param last_change Ultima muda -*/ -void Anfibio::setUltima_muda(string last_change){ - ultima_muda = last_change; -} diff --git a/anfibio.h b/anfibio.h deleted file mode 100644 index 07db3078ee49a01b81e86a697b6cc834abaa1644..0000000000000000000000000000000000000000 --- a/anfibio.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __ANFIBIO_H__ -#define __ANFIBIO_H__ -#include "animal.h" - - -/* @brief Classe Anfibio, que modela um animal do tipo AnfÃbio, que toma Animal como classe pai a herdar seus atributos -* @param Atributos privados: -* total_mudas - número de mudas do animal, -* ultima_muda - ultima muda do animal -* Métodos públicos: -* getTotal_mudas - retorna o número total de mudas -* setTotal_mudas - modifica o número total de mudas -* getUltima_muda - retorna a última muda -* setUltima_muda - modifica a última muda -* Anfibio - Construtor cria um animal do tipo AnfÃbio, que toma Animal como classe pai a herdar seus atributos -* -*/ -using namespace std; - -class Anfibio: public Animal{ - private: - int total_mudas; - string ultima_muda; - - public: - int getTotal_mudas(); - void setTotal_mudas(int total_changes); - string getUltima_muda(); - void setUltima_muda(string last_change); - Anfibio(int identity, string clas, string name, string scientific, char sex, float size, string diet, string baptism, Veterinario vet, Tratador caretaker, int total_changes, string last_change); -}; - -#endif diff --git a/anfibioexotico.cpp b/anfibioexotico.cpp deleted file mode 100644 index 3ddd0f88fe6a3fbf0cf81b83d632373bb22d1b0d..0000000000000000000000000000000000000000 --- a/anfibioexotico.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "anfibioexotico.h" - -/** -* @brief Sobrecarga do operador de inserção para animal do tipo AnfibioExotico -* @param output - stream de saida -* anfexo - Objeto do tipo AnfibioExotico -* -*/ -std::ostream& operator<< (std::ostream &output, AnfibioExotico const &anfexo) { - output << anfexo.id >> ";" << anfexo.classe << ";" << anfexo.nome << ";" << anfexo.cientifico << ";" << - anfexo.sexo << ";" << anfexo.tamanho << ";" << anfexo.dieta << ";" << anfexo.batismo << ";" << anfexo.veterinario - << ";" << anfexo.tratador << ";" << anfexo.total_mudas << ";" << anfexo.ultima_muda << ";" - << anfexo.ibama << ";" << anfexo.pais_origem; - - return output; - - } - - /** - * @brief Construtor cria um animal do tipo AnfÃbioExotico, que toma Anfibio e AnimalExotico como classe pai a herdar seus atributos - * @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, - * sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, - * baptism - nome de batismo do animal, vet - veterinário associado ao animal, - * caretaker - tratador associado ao animal, total_changes - número de mudas do animal, - * last_change - ultima muda do animal, biernr - ibama, origin_country - pais de origem de animal - */ -AnfibioExotico(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int total_changes, string last_change, string biernr, string origin_country): - - Anfibio(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker, total_changes, last_change), - AnimalExotico(biernr, origin_country) - {} -} diff --git a/anfibioexotico.h b/anfibioexotico.h deleted file mode 100644 index 0a10cb9d2fc04e643487bc63278d402b168a3e42..0000000000000000000000000000000000000000 --- a/anfibioexotico.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __ANFIBIOEXOTICO_H__ -#define __ANFIBIOEXOTICO_H__ - -#include "anfibio.h" -#include "animalexotico.h" - - -/* @brief Classe Anfibio, que modela um AnfÃbio do tipo Exotico, que toma Anfibio e AnimalExotico -* como classes pai a herdar seus atributos -* @param Métodos públicos: -* friend std::ostream& operator<< (std::ostream &output, AnfibioExotico const anfexo) Sobrecarga do operador de inserção para animal do tipo AnfibioExotico -* AnfibioExotico - Construtor cria um animal do tipo AnfÃbioExotico -* -*/ -class AnfibioExotico: public Anfibio, AnimalExotico { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, AnfibioExotico const anfexo); - AnfibioExotico(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int total_changes, string last_change, string biernr, string origin_country); - AnfibioExotico(); - -}; - -#endif diff --git a/anfibionativo.cpp b/anfibionativo.cpp deleted file mode 100644 index 6ada319aa067f04b4ca50c0b11552f1946710426..0000000000000000000000000000000000000000 --- a/anfibionativo.cpp +++ /dev/null @@ -1,37 +0,0 @@ -#include "anfibionativo.h" - -/** -* @brief Sobrecarga do operador de inserção para animal do tipo AnfibioNativo -* @param output - stream de saida -* anfnat - Objeto do tipo AnfibioNativo -* -*/ - -std::ostream& operator<< (std::ostream &output, AnfibioNativo const &anfnat) { - output << anfnat.id >> ";" << anfnat.classe << ";" << anfnat.nome << ";" << anfnat.cientifico << ";" << - anfnat.sexo << ";" << anfnat.tamanho << ";" << anfnat.dieta << ";" << anfnat.batismo << ";" << anfnat.veterinario - << ";" << anfnat.tratador << ";" << anfnat.total_mudas << ";" << anfnat.ultima_muda << ";" - << anfnat.ibama << ";" << anfnat.uf_origem << ";" << anfnat.autorizacao; - - return output; - - } - - /** - * @brief Construtor cria um animal do tipo AnfÃbioNativo, que toma Anfibio, - * e AnimalNativo como classe pai a herdar seus atributos - * @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, - * sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, - * baptism - nome de batismo do animal, vet - veterinário associado ao animal, - * caretaker - tratador associado ao animal, total_changes - número de mudas do animal, - * last_change - ultima muda do animal, biernr - ibama, origin_state - estado de origem do animal, - * authorization - autorização do animal - */ -AnfibioNativo::AnfibioNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker,int total_changes, - string last_change, string biernr, string origin_state, string authorization): - - Anfibio(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker, total_changes, last_change), - AnimalNativo(biernr, origin_state, authorization) - {} -} diff --git a/anfibionativo.h b/anfibionativo.h deleted file mode 100644 index 85591517acced2e749718c5bcd07f1f8235e06b9..0000000000000000000000000000000000000000 --- a/anfibionativo.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ANFIBIONATIVO_H__ -#define __ANFIBIONATIVO_H__ - -#include "anfibio.h" -#include "animalnativo.h" - -/* @brief Classe AnfibioNativo, que modela um AnfÃbio do tipo Nativo, que toma Anfibio e AnimalNativo -* como classes pai a herdar seus atributos -* @param Métodos públicos: -* friend std::ostream& operator<< (std::ostream &output, AnfibioNativo const anfnat) Sobrecarga do operador de inserção para animal do tipo AnfibioNativo -* AnfibioNativo - Construtor cria um animal do tipo AnfÃbioNativo -* -*/ -class AnfibioNativo: public Anfibio, AnimalNativo { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, AnfibioNativo const anfnat); - AnfibioNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int total_changes, string last_change, string biernr, string origin_state, string authorization); - AnfibioNativo(); - -}; - -#endif diff --git a/animal.cpp b/animal.cpp deleted file mode 100644 index 920621c05f1fff87a8fcd21f89b1f325d6d464b7..0000000000000000000000000000000000000000 --- a/animal.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include "animal.h" -#include <fstream> - -using namespace std; - -/** -* @brief Construtor cria um animal do tipo Animal -* @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, -* sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, -* baptism - nome de batismo do animal, vet - veterinário associado ao animal, -* caretaker - tratador associado ao animal, -*/ -Animal::Animal(int identity, string clas, string name, string scientific, char sex, float size, string diet, string baptism, Veterinario vet, Tratador caretaker): - - id(identity), classe(clas), cientifico(scientific), - sexo(sex), tamanho(size), dieta(diet), batismo(baptism), - veterinario(vet), tratador(caretaker) -{} - - - /** - * @brief Funcao que retorna o id do animal - * @return ID do animal - */ -int Animal::getId(){ - return id; -} - - -/** -* @brief Funcao que modifica o ID do animal -* @param identity ID do animal -*/ -void Animal::setId(int identity){ - id = identity; -} - - -/** -* @brief Funcao que retorna a classe do animal -* @return Classe do animal -*/ -string Animal::getClasse(){ - return classe; -} - - -/** -* @brief Funcao que modifica a classe do animal -* @param clas Classe do animal -*/ -void Animal::setClasse(string clas){ - classe = clas; -} - - -/** -* @brief Funcao que retorna o nome do animal -* @return Nome do animal -*/ -string Animal::getNome() { - return nome; -} - - - -/** -* @brief Funcao que modifica o nome do animal -* @param name Nome do animal -*/ -void Animal::setNome(string name){ - nome = name; -} - - -/** -* @brief Funcao que retorna o nome cientifico do animal -* @return Nome cientifico do animal -*/ -string Animal::getCientifico(){ - return cientifico; -} - -/** -* @brief Funcao que modifica o nome cientifico do animal -* @param scientific Nome cientifico do animal -*/ -void Animal::setCientifico(string scientific){ - cientifico = scientific; -} - -/** -* @brief Funcao que retorna o sexo do animal -* @return Sexo do animal -*/ -char Animal::getSexo(){ - return sexo; -} - -/** -* @brief Funcao que modifica o sexo do animal -* @param sex Sexo do animal -*/ -void Animal::setSexo(char sex){ - sexo = sex; -} - -/** -* @brief Funcao que retorna o tamanho do animal -* @return Tamanho do animal -*/ -float Animal::getTamanho(){ - return tamanho; -} - - -/** -* @brief Funcao que modifica o tamanho do animal -* @param size Tamanho do animal -*/ -void Animal::setTamanho(float size){ - tamanho = size; -} - -/** -* @brief Funcao que retorna a dieta do animal -* @return Dieta do animal -*/ -string Animal::getDieta(){ - return dieta; -} - -/** -* @brief Funcao que modifica a dieta do animal -* @param diet Dieta do animal -*/ -void Animal::setDieta(string diet){ - dieta = diet; -} - - -/** -* @brief Funcao que retorna o nome de batismo do animal -* @return Nome de batismo do animal -*/ -string Animal::getBatismo(){ - return batismo; -} - - -/** -* @brief Funcao que modifica o nome de batismo do animal -* @param baptism Nome de batismo do animal -*/ -void Animal::setBatismo(string baptism){ - batismo = baptism; -} - - -/** -* @brief Funcao que retorna o veterinario animal -* @return veterinario do animal -*/ -Veterinario Animal::getVeterinario(){ - return veterinario; -} - - -/** -* @brief Funcao que modifica o veterinario do animal -* @param vet Veterinario do animal -*/ -void Animal::setVeterinario(Veterinario vet){ - veterinario = vet; -} - -/** -* @brief Funcao que retorna o tratador do animal -* @return tratador do animal -*/ -Tratador Animal::getTratador(){ - return tratador; -} - -/** -* @brief Funcao que modifica o tratador do animal -* @param caretaker Tratador do animal -*/ -void Animal::setTratador(Tratador caretaker){ - tratador = caretaker; -} - -// std::istream& operator>>( std::istream &input, Animal const &A ) { -// input >> A.id >> ";" >> A.classe >> ";" >> A.nome >> ";" >> A.cientifico >> ";" -// >> A.sexo >> ";" >> A.tamanho >> ";" >> A.dieta >> ";" >> A.batismo; -// return input; -// } - -std::ostream& operator<< (std::ostream &output, Animal const &A) { - output << A.id << ";" << A.classe << ";" << A.nome << ";" << A.cientifico << ";" << - A.sexo << ";" << A.tamanho << ";" << A.dieta << ";" << A.batismo << ";" << A.veterinario << ";" - << A.tratador; - - return output; - - } diff --git a/animal.h b/animal.h deleted file mode 100644 index 457135d5102c8e2e88eae6007c4c04c0a7781712..0000000000000000000000000000000000000000 --- a/animal.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef __ANIMAL_H__ -#define __ANIMAL_H__ -#include "veterinario.h" -#include "tratador.h" - -#include <iostream> -#include <string> -#include <fstream> - -using namespace std; - -/* @brief Classe Animal, que modela um ser animal -* @param Atributos protegidos: -* id - identificador do animal, -* classe - classe do animal -* nome - nome genérico do animal -* cientifico - nome cientifico do animal -* sexo - sexo do animal, -* tamanho - tamanho do animal -* dieta - de que o animal se alimenta -* batismo - nome de batismo do animal -* veterinario - veterinario ao qual o animal está associado -* tratador - tratador ao qual o animal está associado - -* Métodos públicos: -* getId - retorna o id do animal -* setId - modifica o id do animal -* getNome - retorna o nome do animal -* setNome - modifica o nome do animal -* getCientifico - retorna o nome cientifico do animal -* setCientifico - modifica o nome cientifico do animal -* getSexo- retorna o sexo do animal -* setSexo - modifica o sexo do animal -* getTamanho - retorna o tamanho do animal -* setTamanho - modifica o tamanho do animal -* getDieta - retorna a dieta do animal -* setDieta - modifica a dieta do animal -* getVeterinario - retorna o veterinario do animal -* setVeterinario - modifica o veterinario do animal -* getTratador - retorna o tratador do animal -* setTratador - modifica o tratador do animal -* Animal - Construtor cria um ser do tipo Animal, inicializando os seus atributos -* -*/ -class Animal { - protected: - int id; - string classe; - string nome; - string cientifico; - char sexo; - float tamanho; - string dieta; - string batismo; - Veterinario veterinario; - Tratador tratador; - - - public: - int getId(); - void setId(int identity); - string getClasse(); - void setClasse(string clas); - string getNome(); - void setNome(string name); - string getCientifico(); - void setCientifico(string scientific); - char getSexo(); - void setSexo(char sex); - float getTamanho(); - void setTamanho(float size); - string getDieta(); - void setDieta(string diet); - string getBatismo(); - void setBatismo(string baptism); - Veterinario getVeterinario(); - void setVeterinario(Veterinario vet); - Tratador getTratador(); - void setTratador(Tratador caretaker); - //std::istream& operator>>( std::istream &input, Animal const &A ); - friend std::ostream& operator<< (std::ostream &output, Animal const &A); - Animal(int identity, string clas, string name, string scientific, char sex, float size, string diet, string baptism, Veterinario vet, Tratador caretaker); -}; - - -#endif diff --git a/animalexotico.cpp b/animalexotico.cpp deleted file mode 100644 index dfb01128846b2b0072bc1eb596e45184503ade74..0000000000000000000000000000000000000000 --- a/animalexotico.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "animalexotico.h" - - -/** -* @brief Construtor cria um AnimalExotico, que toma AnimalSilvestre como classe pai a herdar seus atributos -* @param biernr - IBAMA, origin_country - pais de origem do animal -*/ -AnimalExotico::AnimalExotico(string biernr, string origin_country): - - AnimalSilvestre(biernr), - pais_origem(origin_country) - -{} - - /** - * @brief Funcao que retorna o pais de origem - * @return pais de origem - */ -string AnimalExotico::getPais_origem(){ - return pais_origem; -} - -/** -* @brief Funcao que modifica o pais de origem -* @param origin_country Pais de origem -*/ -void AnimalExotico::setPais_origem(string origin_country){ - pais_origem = origin_country; -} diff --git a/animalexotico.h b/animalexotico.h deleted file mode 100644 index f783547d61ee75ee3356230491cbe75d3b82b1da..0000000000000000000000000000000000000000 --- a/animalexotico.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __ANIMALEXOTICO_H__ -#define __ANIMALEXOTICO_H__ -#include "animalsilvestre.h" - - -/* @brief Classe AnimalExotico, que modela um ser animal Exotico e toma AnimalSilvestre como classe pai pra herdar seus atributos -* @param Atributos protegidos: -* pais_origem - pais de origem do animal - -* Métodos públicos: -* getPais_origem - retorna o pais de origem do animal -* setPais_origem - modifica o pais de origem do animal -* AnimalExotico - Construtor cria um AnimalExotico, inicializando os seus atributos -* -*/ -class AnimalExotico: public AnimalSilvestre{ - protected: - string pais_origem; - - public: - string getPais_origem(); - void setPais_origem(string origin_country); - AnimalExotico(string biernr, string origin_country); -}; - -#endif diff --git a/animalnativo.cpp b/animalnativo.cpp deleted file mode 100644 index 566539f12e7707f1f807b5fcc54b42d5f9da9798..0000000000000000000000000000000000000000 --- a/animalnativo.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include "animalnativo.h" - - -/** -* @brief Construtor cria um AnimalNativo, que toma AnimalSilvestre como classe pai a herdar seus atributos -* @param biernr - IBAMA, origin_state - estado de origem do animal, authorization - autorização -*/ -AnimalNativo::AnimalNativo(string biernr, string origin_state, string authorization): - - AnimalSilvestre(biernr), - uf_origem(origin_state), autorizacao(authorization) - - -{} - - /** - * @brief Funcao que retorna o estado de origem - * @return estado de origem - */ -string AnimalNativo::getUf_origem(){ - return uf_origem; -} - - - -/** -* @brief Funcao que modifica o estado de origem -* @param origin_state Estado de origem -*/ -void AnimalNativo::setUf_origem(string origin_state){ - uf_origem = origin_state; -} - -/** -* @brief Funcao que retorna a autorizacao -* @return autorizacao -*/ -string AnimalNativo::getAutorizacao(){ - return autorizacao; -} - - - -/** -* @brief Funcao que modifica a autorizacao -* @param authorization Autorização -*/ -void AnimalNativo::setAutorizacao(string authorization){ - autorizacao = authorization; -} diff --git a/animalnativo.h b/animalnativo.h deleted file mode 100644 index cd2c2e6668be835274e395583ab44439243c7a72..0000000000000000000000000000000000000000 --- a/animalnativo.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __ANIMALNATIVO_H__ -#define __ANIMALNATIVO_H__ -#include "animalsilvestre.h" - - -/* @brief Classe AnimalNativo, que modela um ser animal Nativo e toma AnimalSilvestre como classe pai pra herdar seus atributos -* @param Atributos protegidos: -* uf_origem - estado de origem do animal -* autorizacao - autorizacao do animal - -* Métodos públicos: -* getUf_origem - retorna o estado de origem do animal -* setUf_origem - modifica o estado de origem do animal -* getAutorizacao - retorna a autorizacao do animal -* setAutorizacao - modifica a autorizacao do animal -* AnimalSilvestre - Construtor cria um AnimalExotico, inicializando os seus atributos -* -*/ -class AnimalNativo: public AnimalSilvestre{ - private: - string uf_origem; - string autorizacao; - - public: - string getUf_origem(); - void setUf_origem(string origin_state); - string getAutorizacao(); - void setAutorizacao(string authorization); - AnimalNativo(string biernr, string origin_state, string authorization); -}; - -#endif diff --git a/animalsilvestre.cpp b/animalsilvestre.cpp deleted file mode 100644 index 40a2df53a4051ed5dd4d27243589ddfbff202f01..0000000000000000000000000000000000000000 --- a/animalsilvestre.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "animalsilvestre.h" - - -/** -* @brief Construtor cria um animal Silvestre -* @param biernr - IBAMA -*/ -AnimalSilvestre::AnimalSilvestre(string biernr): - ibama(biernr) - -{} - - /** - * @brief Funcao que retorna o IBAMA - * @return IBAMA - */ -string AnimalSilvestre::getIbama(){ - return ibama; -} - -/** -* @brief Funcao que modifica o IBAMA -* @param biernr IBAMA -*/ -void AnimalSilvestre::setIbama(string biernr){ - ibama = biernr; -} diff --git a/animalsilvestre.h b/animalsilvestre.h deleted file mode 100644 index d7558625fb278d1a716bac92084240c78680dd0f..0000000000000000000000000000000000000000 --- a/animalsilvestre.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef __ANIMALSILVESTRE_H__ -#define __ANIMALSILVESTRE_H__ - -#include <iostream> -#include <string> - -using namespace std; - - -/* @brief Classe AnimalSilvestre, que modela um ser animal Silvestre -* @param Atributos protegidos: -* ibama - IBAMA - -* Métodos públicos: -* getIbama - retorna o IBAMA -* setIbama - modifica o IBAMA -* AnimalSilvestre - Construtor cria um AnimalSilvestre, inicializando os seus atributos -* -*/ - -class AnimalSilvestre{ - protected: - string ibama; - - public: - string getIbama(); - void setIbama(string biernr); - AnimalSilvestre(string biernr); -}; - -#endif diff --git a/ave.cpp b/ave.cpp deleted file mode 100644 index c79ef4f220571163c2426412383d04723cb710cc..0000000000000000000000000000000000000000 --- a/ave.cpp +++ /dev/null @@ -1,57 +0,0 @@ -#include "ave.h" - - -/** -* @brief Construtor cria um animal do tipo Ave, que toma Animal como classe pai a herdar seus atributos -* @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, -* sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, -* baptism - nome de batismo do animal, vet - veterinário associado ao animal, -* caretaker - tratador associado ao animal, tamanho_bico - tamanho do bico da ave, -* envergadura - tamanho da envergadura -*/ -Ave::Ave(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int beak_size, int wingspan): - - Animal(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker), - - tamanho_bico(beak_size), envergadura(wingspan) - - -{} - - -/** -* @brief Funcao que retorna o tamanho do bico -* @return Tamanho do bico -*/ -int Ave::getTamanho_bico(){ - return tamanho_bico; -} - - -/** -* @brief Funcao que modifica o tamanho do bico -* @param beak_size Tamanho do bico -*/ -void Ave::setTamanho_bico(int beak_size){ - tamanho_bico = beak_size; -} - - -/** -* @brief Funcao que retorna o tamanho da envergadura -* @return Tamanho da envergadura -*/ -int Ave::getEnvergadura(){ - return envergadura; -} - - -/** -* @brief Funcao que modifica o tamanho da envergadura -* @param beak_size Tamanho da envergadura -*/ -void Ave::setEnvergadura(int wingspan){ - envergadura = wingspan; -} diff --git a/ave.h b/ave.h deleted file mode 100644 index ce26aae4c986329033dc5b704dcee896c6c708f6..0000000000000000000000000000000000000000 --- a/ave.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef __AVE_H__ -#define __AVE_H__ -#include "animal.h" - - -/* @brief Classe Ave, que modela um animal do tipo Ave, que toma Animal como classe pai a herdar seus atributos -* @param Atributos privados: -* tamanho_bico - tamanho do bico da ave -* envergadura - tamanho da envergadura -* Métodos públicos: -* getTamanho_bico - retorna o tamanho do bico -* setTamanho_bico - modifica o tamanho do bico -* getEnvergadura - retorna o tamanho da envergadura -* setEnvergadura - modifica o tamanho da envergadura -* Ave - Construtor cria um animal do tipo Ave, que toma Animal como classe pai a herdar seus atributos -* -*/ -class Ave: public Animal{ - private: - int tamanho_bico; - int envergadura; - - public: - int getTamanho_bico(); - void setTamanho_bico(int beak_size); - int getEnvergadura(); - void setEnvergadura(int wingspan); - Ave(int identity, string clas, string name, string scientific, char sex, float size, string diet, - string baptism, Veterinario vet, Tratador caretaker, int tamanho_bico, int envergadura); - -}; - -#endif diff --git a/avenativa.cpp b/avenativa.cpp deleted file mode 100644 index 572254fa27585ef038f691bee9ff297d869d554f..0000000000000000000000000000000000000000 --- a/avenativa.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "avenativa.h" - -/** -* @brief Sobrecarga do operador de inserção para animal do tipo AveNativa -* @param output - stream de saida -* anfnat - Objeto do tipo AveNativa -* -*/ - -std::ostream& operator<< (std::ostream &output, AveNativa const &avenat) { - output << avenat.id >> ";" << avenat.classe << ";" << avenat.nome << ";" << avenat.cientifico << ";" << - avenat.sexo << ";" << avenat.tamanho << ";" << avenat.dieta << ";" << avenat.batismo << ";" << avenat.veterinario - << ";" << avenat.tratador << ";" << avenat.tamanho_bico << ";" << avenat.envergadura << ";" - << avenat.ibama << ";" << avenat.uf_origem << ";" << avenat.autorizacao; - - return output; - - } - - /** - * @brief Construtor cria um animal do tipo AveNativa, que toma Ave, AnimalSilvestre - * e AnimalNativo como classe pai a herdar seus atributos - * @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, - * sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, - * baptism - nome de batismo do animal, vet - veterinário associado ao animal, - * caretaker - tratador associado ao animal, beak_size - tamanho do bico, - * wingspan - envergadura da asa, biernr - ibama, origin_state - estado de origem do animal, - * authorization - autorização do animal - */ -AveNativa(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker,int beak_size, - int wingspan, string biernr, string origin_state, string authorization): - - Ave(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker, beak_size, wingspan), - AnimalSilvestre(biernr), - AnimalNativo(origin_state, authorization) - {} -} diff --git a/avenativa.h b/avenativa.h deleted file mode 100644 index 0eb21def3d0428ff881fd6b91d3aa8389042c694..0000000000000000000000000000000000000000 --- a/avenativa.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __AVENATIVA_H__ -#define __AVENATIVA_H__ - -#include "ave.h" -#include "animalsilvestre.h" -#include "animalnativo.h" - -/* @brief Classe Ave, que modela um Ave do tipo Nativa, que toma Ave, AnimalSilvestre e AnimalNativo -* como classes pai a herdar seus atributos -* @param Métodos públicos: -* friend std::ostream& operator<< (std::ostream &output, AveNativa const avenat) Sobrecarga do operador de inserção para animal do tipo AveNativa -* AveNativa - Construtor cria um animal do tipo AveNativa -* -*/ -class AveNativa: public Ave, AnimalSilvestre, AnimalNativo { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, AveNativa const avenat); - AveNativa(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - int beak_size, int wingspan, string biernr, string origin_state, string authorization); - AveNativa(); - -}; - -#endif diff --git a/funcionario.cpp b/funcionario.cpp deleted file mode 100644 index 78c997fd8f666f0fbb1fbce70c5d55a80f27d355..0000000000000000000000000000000000000000 --- a/funcionario.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "funcionario.h" - -Funcionario::Funcionario(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string 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(){ - return id; -} - -void Funcionario::setId(int identity){ - id = identity; -} - -string Funcionario::getFuncao(){ - return funcao; -} - -void Funcionario::setFuncao(string role){ - funcao = role; -} - -string Funcionario::getNome() { - return nome; -} - -void Funcionario::setNome(string name){ - nome = name; -} - -string Funcionario::getCpf(){ - return cpf; -} - -void Funcionario::setCpf(string doc_cpf){ - cpf = doc_cpf; -} - -short Funcionario::getIdade(){ - return idade; -} - -void Funcionario::setIdade(short age){ - idade = age; -} - -char Funcionario::getTipo_sanguineo(){ - return tipo_sanguineo; -} - -void Funcionario::setTipo_sanguineo(char blood_type){ - tipo_sanguineo = blood_type; -} - -char Funcionario::getFator_RH(){ - return fator_RH; -} - -void Funcionario::setFator_RH(char rh_factor){ - fator_RH = rh_factor; -} - -string Funcionario::getEspecialidade(){ - return especialidade; -} -void Funcionario::setEspecialidade(string specialty){ - especialidade = specialty; -} diff --git a/funcionario.h b/funcionario.h deleted file mode 100644 index 053d201f2286e8c282f06b0112d4073d3616295b..0000000000000000000000000000000000000000 --- a/funcionario.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __FUNCIONARIO__H__ -#define __FUNCIONARIO__H__ - -#include <iostream> -#include <string> -using namespace std; - -class Funcionario { - protected: - int id; - string funcao; - string nome; - string cpf; - short idade; - char tipo_sanguineo; - char fator_RH; - string especialidade; - - public: - int getId(); - void setId(int identity); - string getFuncao(); - void setFuncao(string role); - string getNome(); - void setNome(string name); - string getCpf(); - void setCpf(string doc_cpf); - short getIdade(); - void setIdade(short age); - char getTipo_sanguineo(); - void setTipo_sanguineo(char blood_type); - char getFator_RH(); - void setFator_RH(char rh_factor); - string getEspecialidade(); - 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(); - - -}; - -#endif diff --git a/linkedlist.cpp b/linkedlist.cpp deleted file mode 100644 index ce4d166ae73293e1b25dee2153cea0cfafe21086..0000000000000000000000000000000000000000 --- a/linkedlist.cpp +++ /dev/null @@ -1,192 +0,0 @@ -#include "linkedlist.h" - -template <class T> -LinkedList<T>::LinkedList(){ - this->head = new Node<T>(); - this->tail = new Node<T>(); - - this->head->setNext(this->tail); - this->head->setPrevious(NULL); - - this->tail->setNext(NULL); - this->tail->setPrevious(this->head); - - this->quantity = 0; -} - -template <class T> -LinkedList<T>::~LinkedList(){ - Node<T>* no = this->head; - while(no != this->tail){ - Node<T>* toDestroy = no; - no = no->getNext(); - delete toDestroy; - } - - delete this->tail; -} - -template <class T> -int LinkedList<T>::getQuantity(void) { - return this->quantity; -} - -template <class T> -bool LinkedList<T>::isEmpty(void) { - return this->quantity == 0; -} - -template <class T> -Node<T>* LinkedList<T>::getHead(void) { - return this->head; -} - -template <class T> -Node<T>* LinkedList<T>::getTail(void) { - return this->tail; -} - - -template <class T> -T LinkedList<T>::get(int i) { - int count = 1; - T result; - for(Node<T>* no = this->head->getNext(); no != this->tail; no = no->getNext()){ - if( i == count ){ - result = no->getValue(); - break; - } - count++; - } - return result; -} - -template <class T> -int LinkedList<T>::search(T node_content) { - int count = 1; - - for(Node<T>* no = this->head->getNext(); no != this->tail; no = no->getNext()) { - T value = no->getValue(); - if( no == value ) - { - return count; - } - count++; - } - return -1; -} - -template <class T> -void LinkedList<T>::print(void) { - for(Node<T>* no = this->head->getNext(); no != this->tail; no = no->getNext()) - { - std::cout << no->getValue() << " "; - } - std::cout << std::endl; -} - -template <class T> -bool LinkedList<T>::insertBegin(T node_content) { - - Node <T>* no = this->getHead(); - Node <T>* new_no = new Node<T>(node_content); - - new_no->setNext(no->getNext()); - new_no->setPrevious(no); - new_no->getNext()->setPrevious(new_no); - new_no->getPrevious()->setNext(new_no); - quantity++; - - return true; -} - -template <class T> -bool LinkedList<T>::insertEnd(T node_content) -{ - Node <T>* no = this->getTail(); - Node <T>* new_no = new Node<T>(node_content); - - new_no->setNext(no); - new_no->setPrevious(no->getPrevious()); - new_no->getNext()->setPrevious(new_no); - new_no->getPrevious()->setNext(new_no); - quantity++; - return true; -} - -template <class T> -bool LinkedList<T>::insert(int i, T s) -{ - int y = 0; - Node <T>* x = new Node<T>(s) ; - Node<T>* n = this->getHead(); - while (y != i){ - if(n == this->getTail()){ - return false; - }else{ - n = n->getNext(); - y++; - } - } - if( i == y){ - x->setNext(n); - x->setPrevious(n->getPrevious()); - n->setPrevious(x); - n->getPrevious()->getPrevious()->setNext(x); - - quantity++; - return true; - } - return false; -} - - - -template <class T> -T LinkedList<T>::removeEnd(void) { - T no_toremove; - Node<T>* no ; - no = this->getTail()->getPrevious(); - no_toremove = no->getValue(); - this->getTail()->setPrevious(this->getTail()->getPrevious()->getPrevious() ); - this->getTail()->getPrevious()->setNext(this->getTail()); - - quantity--; - delete no; - return no_toremove; -} - -template <class T> -T LinkedList<T>::removeBegin(void) { - T no_toremove; - Node<T>* no ; - no = this->getHead()->getNext(); - no_toremove = no->getValue(); - this->getHead()->setNext(this->getHead()->getNext()->getNext() ); - this->getHead()->getNext()->setPrevious(this->getHead()); - quantity--; - - delete no; - return no_toremove; - -} - -template <class T> -T LinkedList<T>::remove(int indice) { - int count = 0; - - Node<T>* n = this->getHead(); - while (count != indice){ - n = n->getNext(); - count++; - } - if( indice == count){ - T valor = n->getValue(); - n->getNext()->setPrevious(n->getPrevious()); - n->getPrevious()->setNext(n->getNext()); - quantity--; - delete n; - return valor; - } - return ""; -} diff --git a/linkedlist.h b/linkedlist.h deleted file mode 100644 index 58404941d01c77e2f20f34a5c5a6828ce3f99247..0000000000000000000000000000000000000000 --- a/linkedlist.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef __LINKEDLIST_H__ -#define __LINKEDLIST_H__ - -#include "node.h" -#include <string> - -typedef enum { - OK , - HeadNull, - TailNull, - HeadPrevious, - HeadNextNull, - TailNext, - TailPreviousNull, - HeadTail, - IncorrectLink -} ListStatus ; - -template <class T> -class LinkedList { -private: - Node<T>* head; - Node<T>* tail; - int quantity; - -public: - LinkedList(void); - ~LinkedList(void); - - Node<T>* getHead(void); - Node<T>* getTail(void); - - T get(int); - int search(T); - bool insertEnd(T); - bool insertBegin(T); - bool insert(int, T); - - T removeEnd(void); - T removeBegin(void); - T remove(int); - - void print(void); - - bool isEmpty(void); - int getQuantity(void); -}; - -#endif diff --git a/main.cpp b/main.cpp index 819fb1578ad2937f52a81b766aac36ca15ec567c..79b66ec5133031d5879a9f8db0f199d7ed5f2d3e 100644 --- a/main.cpp +++ b/main.cpp @@ -18,60 +18,12 @@ using namespace std; -void cadastrarAnimal(LinkedList<string> AnimaisCadastrados, LinkedList<Veterinario> VeterinariosCadastrados, LinkedList<Tratador> TratadoresCadastrados){ +void cadastrarAnimal(LinkedList<Animal*> AnimaisCadastrados, LinkedList<Veterinario*> VeterinariosCadastrados, LinkedList<Tratador*> TratadoresCadastrados){ string classe, nome, cientifico, dieta, batismo; - char sexo; - float tamanho; - int idVeterinario,idTratador; - cout<<"Informe a classe do animal:"; - cin>>classe; - cout<<"Informe o nome do animal:"; - cin>>nome; - cout<<"Informe o nome cientifico do animal:"; - cin>>cientifico; - cout<<"Informe o sexo do animal:"; - cin>>sexo; - cout<<"Informe o tamanho do animal:"; - cin>>tamanho; - cout<<"Informe a dieta do animal:"; - cin>>dieta; - cout<<"Informe o Veterinario do animal:"; - cin>>idVeterinario; - cout<<"Informe o Tratador do animal:"; - cin>>idTratador; - cout<<"Informe o nome de batismo do animal:"; - cin>>batismo; - - if(classe == "Mammalia"){ - string corPelo; - cout<<"Informe a cor do pelo do animal:"; - cin>>corPelo; - Mamifero a(a.getId()+1,classe,nome,cientifico,sexo,tamanho,dieta, - VeterinariosCadastrados.get(idVeterinario),TratadoresCadastrados.get(idTratador),batismo,corPelo); - exit( EXIT_SUCCESS); - } - else if (classe == "Aves"){ - - } - - else if (classe == "Reptilia"){ - - } - - else if (classe == "Amphibia"){ - - } - - else{ - cout<< "classe não identificada!"<<endl; - exit(EXIT_FAILURE); - } - -} int main(int argc, char const *argv[]) { - + return 0; -} \ No newline at end of file +} diff --git a/mamifero.cpp b/mamifero.cpp deleted file mode 100644 index 8189eaadb7a12ee671025b05427363e030954126..0000000000000000000000000000000000000000 --- a/mamifero.cpp +++ /dev/null @@ -1,36 +0,0 @@ -#include "mamifero.h" - -/** -* @brief Construtor cria um animal do tipo Mamifero, que toma Animal como classe pai a herdar seus atributos -* @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, -* sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, -* baptism - nome de batismo do animal, vet - veterinário associado ao animal, -* caretaker - tratador associado ao animal, fur_color - cor do pelo -* -*/ -Mamifero::Mamifero(int identity, string clas, string name, string scientific, char sex, - float size, string diet, string baptism, Veterinario vet, Tratador caretaker, string fur_color): - - Animal(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker), - - cor_pelo(fur_color) - - -{} - -/** -* @brief Funcao que retorna a cir di oeki -* @return Cor do pelo -*/ -string Mamifero::getCor_pelo(){ - return cor_pelo; -} - -/** -* @brief Funcao que modifica a cor do pelo -* @param fur_color Cor do pelo -*/ - -void Mamifero::setCor_pelo(string fur_color){ - cor_pelo = fur_color; -} diff --git a/mamifero.h b/mamifero.h deleted file mode 100644 index 24b7fab151d7b7d8e28aab371abd38b23f8fb08f..0000000000000000000000000000000000000000 --- a/mamifero.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __MAMIFERO_H__ -#define __MAMIFERO_H__ -#include "animal.h" -#include <fstream> - - - -/* @brief Classe Mamifero, que modela um animal do tipo Mamifero, que toma Animal como classe pai a herdar seus atributos -* @param Atributos privados: -* cor_pelo - diz se é venenoso ou não -* Métodos públicos: -* getCor_pelo - retorna a cor do pelo -* setCor_pelo - modifica a cor do pelo -* Mamifero - Construtor cria um animal do tipo MamÃfero, que toma Animal como classe pai a herdar seus atributos -* -*/ - -class Mamifero: public Animal{ - private: - string cor_pelo; - - public: - string getCor_pelo(); - void setCor_pelo(string fur_color); - Mamifero(int identity, string clas, string name, string scientific, char sex, float size, string diet, string baptism, Veterinario vet, Tratador caretaker, string fur_color); - -}; - -#endif diff --git a/mamiferonativo.cpp b/mamiferonativo.cpp deleted file mode 100644 index d66eeacf17a7ad57eb585cde4fc4cf001b25f30f..0000000000000000000000000000000000000000 --- a/mamiferonativo.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "mamiferonativo.h" - -/** -* @brief Sobrecarga do operador de inserção para animal do tipo MamiferoNativo -* @param output - stream de saida -* mamnat - Objeto do tipo MamiferoNativo -* -*/ - -std::ostream& operator<< (std::ostream &output, MamiferoNativo const &mamnat) { - output << mamnat.id >> ";" << mamnat.classe << ";" << mamnat.nome << ";" << mamnat.cientifico << ";" << - mamnat.sexo << ";" << mamnat.tamanho << ";" << mamnat.dieta << ";" << mamnat.batismo << ";" << mamnat.veterinario - << ";" << mamnat.tratador << ";" << mamnat.cor_pelo << ";" << mamnat.ibama << ";" - << mamnat.uf_origem << ";" << mamnat.autorizacao; - - return output; - - } - - /** - * @brief Construtor cria um animal do tipo MamiferoNativo, que toma Mamifero, AnimalSilvestre - * e AnimalNativo como classe pai a herdar seus atributos - * @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, - * sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, - * baptism - nome de batismo do animal, vet - veterinário associado ao animal, - * caretaker - tratador associado ao animal, fur_color - cor do pelo do animal, - * biernr - ibama, origin_state - estado de origem do animal, - * authorization - autorização do animal - */ -MamiferoNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker,string fur_color, - string biernr, string origin_state, string authorization): - - Mamifero(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker, fur_color), - AnimalSilvestre(biernr), - AnimalNativo(origin_state, authorization) - {} -} diff --git a/mamiferonativo.h b/mamiferonativo.h deleted file mode 100644 index 0f603387a6aa855509f81de1ecf3c7f9addcc171..0000000000000000000000000000000000000000 --- a/mamiferonativo.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __MAMIFERONATIVO_H__ -#define __MAMIFERONATIVO_H__ - -#include "mamifero.h" -#include "animalsilvestre.h" -#include "animalnativo.h" - -/* @brief Classe Mamifero, que modela um Mamifero do tipo Nativo, que toma Mamifero, AnimalSilvestre e AnimalNativo -* como classes pai a herdar seus atributos -* @param Métodos públicos: -* friend std::ostream& operator<< (std::ostream &output, MamiferoNativo const mamnat) Sobrecarga do operador de inserção para animal do tipo MamiferoNativo -* MamiferoNativo - Construtor cria um animal do tipo MamiferoNativo -* -*/ -class MamiferoNativo: public Mamifero, AnimalSilvestre, AnimalNativo { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, MamiferoNativo const mamnat); - MamiferoNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - string fur_color, string biernr, string origin_state, string authorization); - MamiferoNativo(); - -}; - -#endif diff --git a/node.cpp b/node.cpp deleted file mode 100644 index a12df52b98968f06abfd9c795621fd8c1c71524c..0000000000000000000000000000000000000000 --- a/node.cpp +++ /dev/null @@ -1,55 +0,0 @@ -#include "node.h" - -template<typename T> -Node<T>::Node(void): -count(0), next(NULL), prev(NULL) {} - -template<typename T> -Node<T>::Node(T val): -value(val), count(0), next(NULL), prev(NULL) {} - -template<typename T> -Node<T>::Node(T val, Node* n, Node* p): -value(val), next(n), prev(p) {} - -template<typename T> -T Node<T>::getValue(void) -{ - return this->value; -} - -template<typename T> -Node<T>* Node<T>::getNext(void) -{ - return this->next; -} - -template<typename T> -void Node<T>::setNext(Node<T>* n) -{ - this->next = n; -} - -template<typename T> -Node<T>* Node<T>::getPrevious(void) -{ - return this->prev; -} - -template<typename T> -void Node<T>::setPrevious(Node<T>* p) -{ - this->prev = p; -} - -template<typename T> -int Node<T>::getCount() -{ - return this->count; -} - -template<typename T> -void Node<T>::setCount(int c) -{ - this->count = c; -} diff --git a/node.h b/node.h deleted file mode 100644 index 8f91593b65a6e706b44ed8a51069623f2192bc2f..0000000000000000000000000000000000000000 --- a/node.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __LINKEDLIST_NODE__ -#define __LINKEDLIST_NODE__ - -#include <iostream> - -template <typename T> -class Node{ -private: - T value; - int count; - Node<T>* next; - Node<T>* prev; - -public: - Node(); - Node( T ); - Node( T, Node*, Node* ); - T getValue(); - void setValue(T val); - Node* getNext(); - void setNext(Node*); - Node* getPrevious(); - void setPrevious(Node*); - int getCount(); - void setCount(int); -}; - - -#endif diff --git a/readcsv.cpp b/readcsv.cpp deleted file mode 100644 index 483f509ee4337f1233d3e7107b0ddc93625780de..0000000000000000000000000000000000000000 --- a/readcsv.cpp +++ /dev/null @@ -1,12 +0,0 @@ -#include <fstream> -#include <iostream> -#include <string> - -using namespace std; - -ifstream file ( "file.csv" ); // declare file stream: http://www.cplusplus.com/reference/iostream/ifstream/ -string value; -while (file.good()){ - getline ( file, value, ';' ); // read a string until next comma: http://www.cplusplus.com/reference/string/getline/ - cout << string( value, 1, value.length()-2 ); // display value removing the first and the last character from it -} \ No newline at end of file diff --git a/reptil.cpp b/reptil.cpp deleted file mode 100644 index 5d4806996d8e4946db36af39c2be42ecc0bbe358..0000000000000000000000000000000000000000 --- a/reptil.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "reptil.h" - - -/** -* @brief Construtor cria um animal do tipo Reptil, que toma Animal como classe pai a herdar seus atributos -* @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, -* sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, -* baptism - nome de batismo do animal, vet - veterinário associado ao animal, -* caretaker - tratador associado ao animal, isPoisonous - estado do animal ser venenoso ou não, -* tipo_veneno - tipo do veneno do animal -* -*/ -Reptil::Reptil(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, - bool isPoisonous, string poison_type): - - Animal(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker), - - venenoso(isPoisonous), tipo_veneno(poison_type) - - -{} - -/** -* @brief Funcao que retorna o estado de venenoso do animal -* @return É venenoso/não é venenoso -*/ -bool Reptil::getVenenoso(){ - return venenoso; -} - -/** -* @brief Funcao que modifica o estado de venenoso do animal -* @param isPoisonous se é ou não venenoso -*/ -void Reptil::setVenenoso(bool isPoisonous){ - venenoso = isPoisonous; -} - -/** -* @brief Funcao que retorna tipo de veneno -* @return Tipo de veneno -*/ -string Reptil::getTipo_veneno(){ - return tipo_veneno; -} - -/** -* @brief Funcao que modifica o tipo de veneno -* @param poison_type Tipo de veneno -*/ -void Reptil::setTipo_veneno(string poison_type){ - tipo_veneno = poison_type; -} diff --git a/reptil.h b/reptil.h deleted file mode 100644 index 987224ec968082268a70ae21097538e244a68372..0000000000000000000000000000000000000000 --- a/reptil.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef __REPTIL_H__ -#define __REPTIL_H__ -#include "animal.h" - - -/* @brief Classe Reptil, que modela um animal do tipo Réptil, que toma Animal como classe pai a herdar seus atributos -* @param Atributos privados: -* venenoso - diz se é venenoso ou não -* envergadura - tipo de veneno que o réptil tem -* Métodos públicos: -* getVenenoso - retorna se o réptil é venenoso ou não -* setVenenoso - modifica o estado de 'venenoso' -* getTipo_veneno - retorna o tipo de veneno -* setTipo_veneno - modifica o tipo de veneno -* Reptil - Construtor cria um animal do tipo Reptil, que toma Animal como classe pai a herdar seus atributos -* -*/ -class Reptil: public Animal{ - private: - bool venenoso; - string tipo_veneno; - - public: - bool getVenenoso(); - void setVenenoso(bool isPoisonous); - string getTipo_veneno(); - void setTipo_veneno(string poison_type); - Reptil(int identity, string clas, string name, string scientific, char sex, float size, string diet, string baptism, Veterinario vet, Tratador caretaker, bool isPoisonous, string poison_type); - -}; - -#endif diff --git a/reptilnativo.cpp b/reptilnativo.cpp deleted file mode 100644 index 424376ed7d3d80a85b3b679c5fb6aab8d627f3ff..0000000000000000000000000000000000000000 --- a/reptilnativo.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "repiferonativo.h" - -/** -* @brief Sobrecarga do operador de inserção para animal do tipo ReptilNativo -* @param output - stream de saida -* repnat - Objeto do tipo ReptilNativo -* -*/ - -std::ostream& operator<< (std::ostream &output, ReptilNativo const &repnat) { - output << repnat.id >> ";" << repnat.classe << ";" << repnat.nome << ";" << repnat.cientifico << ";" << - repnat.sexo << ";" << repnat.tamanho << ";" << repnat.dieta << ";" << repnat.batismo << ";" << repnat.veterinario - << ";" << repnat.tratador << ";" << repnat.isPoisonous<< ";" << repnat.poison_type << ";" << repnat.ibama << ";" - << repnat.uf_origem << ";" << repnat.autorizacao; - - return output; - - } - - /** - * @brief Construtor cria um animal do tipo ReptilNativo, que toma Reptil, AnimalSilvestre - * e AnimalNativo como classe pai a herdar seus atributos - * @param identity - ID, clas - classe do animal, name - nome do animal, scientific - nome cientÃfico do animal, - * sex - sexo do animal, size - tamanho do animal, diet - dieta do animal, - * baptism - nome de batismo do animal, vet - veterinário associado ao animal, - * caretaker - tratador associado ao animal, isPoisonous - estado do animal em relação ao veneno, - * poison_type - tipo do veneno, biernr - ibama, origin_state - estado de origem do animal, - * authorization - autorização do animal - */ -ReptilNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker,bool isPoisonous, - string poison_type, biernr, string origin_state, string authorization): - - Reptil(identity, clas, name, scientific, sex, size, diet, baptism, vet, caretaker, isPoisonous, poison_type), - AnimalSilvestre(biernr), - AnimalNativo(origin_state, authorization) - {} -} diff --git a/reptilnativo.h b/reptilnativo.h deleted file mode 100644 index 59d51652aeb8d35d5241dc419b0f5c122c436e6f..0000000000000000000000000000000000000000 --- a/reptilnativo.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __REPTILNATIVO_H__ -#define __REPTILNATIVO_H__ - -#include "reptil.h" -#include "animalsilvestre.h" -#include "animalnativo.h" - -/* @brief Classe Reptil, que modela um Reptil do tipo Nativo, que toma Reptil, AnimalSilvestre e AnimalNativo -* como classes pai a herdar seus atributos -* @param Métodos públicos: -* friend std::ostream& operator<< (std::ostream &output, ReptilNativo const repnat) Sobrecarga do operador de inserção para animal do tipo ReptilNativo -* ReptilNativo - Construtor cria um animal do tipo ReptilNativo -* -*/ -class ReptilNativo: public Reptil, AnimalSilvestre, AnimalNativo { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, ReptilNativo const repnat); - ReptilNativo(int identity, string clas, string name, string scientific, char sex, float size, - string diet, string baptism, Veterinario vet, Tratador caretaker, bool isPoisonous, - string poison_type, string biernr, string origin_state, string authorization); - ReptilNativo(); - -}; - -#endif diff --git a/tratador.cpp b/tratador.cpp deleted file mode 100644 index 8834d9011c23a947947b6518cda4a72a5a2e8dcc..0000000000000000000000000000000000000000 --- a/tratador.cpp +++ /dev/null @@ -1,30 +0,0 @@ -#include "tratador.h" - -std::ostream& operator<< (std::ostream &output, Tratador const t) { -output << "Id:" << t.id << endl; -output << "Funcao:"<< t.funcao<< endl; -output << "CPF: " << t.cpf << endl; -output << "Idade: " << t.idade << endl; -output << "Tipo sanguineo: " << t.tipo_sanguineo << endl; -output << "Fator RH : " << t.fator_RH << endl; -output << "Especialidade: " << t.especialidade << endl; - -return output; -} - - -Tratador::Tratador(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty): - - Funcionario(identity, role, name, doc_cpf, age, blood_type, rh_factor, specialty) -{} - -Tratador::Tratador(){ - id = 0; - funcao = "-"; - cpf = "-"; - nome = "-"; - idade = 0; - tipo_sanguineo = '-'; - fator_RH = '-'; - especialidade = "-"; -} diff --git a/tratador.h b/tratador.h deleted file mode 100644 index c06cded6ec66f7f4d6482a26a7af12dbc171ec87..0000000000000000000000000000000000000000 --- a/tratador.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __TRATADOR_H__ -#define __TRATADOR_H__ -#include "funcionario.h" - -class Tratador: public Funcionario { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, Tratador const t); - Tratador(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty); - Tratador(); -}; - -#endif diff --git a/veterinario.cpp b/veterinario.cpp deleted file mode 100644 index 2ae1735657189c8b1395371e93402d5bb17f057d..0000000000000000000000000000000000000000 --- a/veterinario.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "veterinario.h" - -std::ostream& operator<< (std::ostream &output, Veterinario const v) { -output << "Id: " << v.id << endl; -output << "Funcao:" << v.funcao << endl; -output << "CPF: " << v.cpf << endl; -output << "Idade: " << v.idade << endl; -output << "Tipo sanguineo: " << v.tipo_sanguineo << endl; -output << "Fator RH : " << v.fator_RH << endl; -output << "Especialidade: " << v.especialidade << endl; - -return output; -} - - -Veterinario::Veterinario(){ - id = 0; - funcao = "-"; - cpf = "-"; - nome = "-"; - idade = 0; - tipo_sanguineo = '-'; - fator_RH = '-'; - especialidade = "-"; -} - - -Veterinario::Veterinario(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty): - - Funcionario(identity, role, name, doc_cpf, age, blood_type, rh_factor, specialty) -{} diff --git a/veterinario.h b/veterinario.h deleted file mode 100644 index c7ee7d92497e6c38d83d3d6367a60c269926674a..0000000000000000000000000000000000000000 --- a/veterinario.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __VETERINARIO_H__ -#define __VETERINARIO_H__ -#include "funcionario.h" - -class Veterinario: public Funcionario { - private: - - public: - friend std::ostream& operator<< (std::ostream &output, Veterinario const v); - Veterinario(int identity, string role, string name, string doc_cpf, short age, char blood_type, char rh_factor, string specialty); - Veterinario(); -}; - -#endif