From b58d2a522506033cca8413bbf57e967ec7384947 Mon Sep 17 00:00:00 2001 From: Debora Azevedo <deboraazevedoo@gmail.com> Date: Sun, 6 Nov 2016 21:57:36 -0300 Subject: [PATCH] =?UTF-8?q?nineteenth=20commit:=20deletando=20arquivos=20p?= =?UTF-8?q?ara=20modulariza=C3=A7=C3=A3o=20do=20makefile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- anfibio.cpp | 52 ----------- anfibio.h | 33 ------- anfibioexotico.cpp | 34 -------- anfibioexotico.h | 27 ------ anfibionativo.cpp | 37 -------- anfibionativo.h | 26 ------ animal.cpp | 206 -------------------------------------------- animal.h | 86 ------------------ animalexotico.cpp | 29 ------- animalexotico.h | 26 ------ animalnativo.cpp | 50 ----------- animalnativo.h | 32 ------- animalsilvestre.cpp | 27 ------ animalsilvestre.h | 31 ------- ave.cpp | 57 ------------ ave.h | 33 ------- avenativa.cpp | 38 -------- avenativa.h | 27 ------ funcionario.cpp | 82 ------------------ funcionario.h | 42 --------- linkedlist.cpp | 192 ----------------------------------------- linkedlist.h | 49 ----------- main.cpp | 54 +----------- mamifero.cpp | 36 -------- mamifero.h | 29 ------- mamiferonativo.cpp | 38 -------- mamiferonativo.h | 27 ------ node.cpp | 55 ------------ node.h | 29 ------- readcsv.cpp | 12 --- reptil.cpp | 54 ------------ reptil.h | 32 ------- reptilnativo.cpp | 38 -------- reptilnativo.h | 27 ------ tratador.cpp | 30 ------- tratador.h | 14 --- veterinario.cpp | 31 ------- veterinario.h | 14 --- 38 files changed, 3 insertions(+), 1733 deletions(-) delete mode 100644 anfibio.cpp delete mode 100644 anfibio.h delete mode 100644 anfibioexotico.cpp delete mode 100644 anfibioexotico.h delete mode 100644 anfibionativo.cpp delete mode 100644 anfibionativo.h delete mode 100644 animal.cpp delete mode 100644 animal.h delete mode 100644 animalexotico.cpp delete mode 100644 animalexotico.h delete mode 100644 animalnativo.cpp delete mode 100644 animalnativo.h delete mode 100644 animalsilvestre.cpp delete mode 100644 animalsilvestre.h delete mode 100644 ave.cpp delete mode 100644 ave.h delete mode 100644 avenativa.cpp delete mode 100644 avenativa.h delete mode 100644 funcionario.cpp delete mode 100644 funcionario.h delete mode 100644 linkedlist.cpp delete mode 100644 linkedlist.h delete mode 100644 mamifero.cpp delete mode 100644 mamifero.h delete mode 100644 mamiferonativo.cpp delete mode 100644 mamiferonativo.h delete mode 100644 node.cpp delete mode 100644 node.h delete mode 100644 readcsv.cpp delete mode 100644 reptil.cpp delete mode 100644 reptil.h delete mode 100644 reptilnativo.cpp delete mode 100644 reptilnativo.h delete mode 100644 tratador.cpp delete mode 100644 tratador.h delete mode 100644 veterinario.cpp delete mode 100644 veterinario.h diff --git a/anfibio.cpp b/anfibio.cpp deleted file mode 100644 index 9870a4b..0000000 --- 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 07db307..0000000 --- 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 3ddd0f8..0000000 --- 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 0a10cb9..0000000 --- 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 6ada319..0000000 --- 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 8559151..0000000 --- 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 920621c..0000000 --- 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 457135d..0000000 --- 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 dfb0112..0000000 --- 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 f783547..0000000 --- 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 566539f..0000000 --- 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 cd2c2e6..0000000 --- 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 40a2df5..0000000 --- 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 d755862..0000000 --- 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 c79ef4f..0000000 --- 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 ce26aae..0000000 --- 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 572254f..0000000 --- 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 0eb21de..0000000 --- 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 78c997f..0000000 --- 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 053d201..0000000 --- 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 ce4d166..0000000 --- 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 5840494..0000000 --- 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 819fb15..79b66ec 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 8189eaa..0000000 --- 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 24b7fab..0000000 --- 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 d66eeac..0000000 --- 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 0f60338..0000000 --- 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 a12df52..0000000 --- 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 8f91593..0000000 --- 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 483f509..0000000 --- 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 5d48069..0000000 --- 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 987224e..0000000 --- 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 424376e..0000000 --- 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 59d5165..0000000 --- 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 8834d90..0000000 --- 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 c06cded..0000000 --- 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 2ae1735..0000000 --- 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 c7ee7d9..0000000 --- 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 -- GitLab