Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit d2491bf

Browse files
committed
Terceira segunda lista
1 parent 366f831 commit d2491bf

File tree

11 files changed

+211
-58
lines changed

11 files changed

+211
-58
lines changed

cpp/lista2jordana/Cliente.cpp

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ Cliente::Cliente(string nome, string RG, string CPF, string end, string tel, str
44
{
55
this->pedidos = new vector<Pedido *>;
66

7-
this->setNome(nome);
8-
// this->setDataNascimento(dataNasc);
9-
this->setRG(RG);
10-
this->setCPF(CPF);
117
this->setEndereco(end);
128
this->setTelefone(tel);
139
this->setEmail(email);
@@ -27,46 +23,6 @@ Cliente::~Cliente()
2723
cout << "Cliente deletado." << endl;
2824
}
2925

30-
string Cliente::getNome()
31-
{
32-
return this->nome;
33-
}
34-
35-
void Cliente::setNome(string nome)
36-
{
37-
this->nome = nome;
38-
}
39-
40-
tm Cliente::getDataNascimento()
41-
{
42-
return this->dataNascimento;
43-
}
44-
45-
void Cliente::setDataNascimento(tm dataNas)
46-
{
47-
this->dataNascimento = dataNas;
48-
}
49-
50-
string Cliente::getRG()
51-
{
52-
return this->RG;
53-
}
54-
55-
void Cliente::setRG(string RG)
56-
{
57-
this->RG = RG;
58-
}
59-
60-
string Cliente::getCPF()
61-
{
62-
return this->CPF;
63-
}
64-
65-
void Cliente::setCPF(string CPF)
66-
{
67-
this->CPF = CPF;
68-
}
69-
7026
string Cliente::getEndereco()
7127
{
7228
return this->endereco;

cpp/lista2jordana/Cliente.hpp

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,35 +11,24 @@ using namespace std;
1111
class Cliente
1212
{
1313
private:
14-
string nome;
15-
tm dataNascimento;
16-
string RG;
17-
string CPF;
1814
string endereco;
1915
string telefone;
2016
string email;
2117
vector<Pedido *> *pedidos;
2218

2319
public:
24-
Cliente(string nome, string RG, string CPF, string end, string tel, string email);
20+
Cliente(string end, string tel, string email);
2521
~Cliente();
2622

27-
string getNome();
28-
void setNome(string nome);
29-
tm getDataNascimento();
30-
void setDataNascimento(tm dataNascimento);
31-
string getRG();
32-
void setRG(string RG);
3323
void setEmail(string email);
3424
string getEmail();
3525
void setTelefone(string telefone);
3626
string getTelefone();
3727
void setEndereco(string endereco);
3828
string getEndereco();
39-
void setCPF(string CPF);
40-
string getCPF();
41-
vector<Pedido *> *getPedidos();
29+
4230
void adicionarPedido(Pedido *pedido);
31+
vector<Pedido *> *getPedidos();
4332
};
4433

4534
#endif

cpp/lista2jordana/Organizacao.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#include "Organizacao.hpp"
2+
3+
Organizacao::Organizacao(string nomeFantasia, string razaoSocial, string CNPJ)
4+
{
5+
this->setNomeFantasia(nomeFantasia);
6+
// this->setDataNascimento(dataNasc);
7+
this->setRazaoSocial(razaoSocial);
8+
this->setCNPJ(CNPJ);
9+
}
10+
11+
string Organizacao::getNomeFantasia()
12+
{
13+
return this->nomeFantasia;
14+
}
15+
16+
void Organizacao::setNomeFantasia(string nomeFantasia)
17+
{
18+
this->nomeFantasia = nomeFantasia;
19+
}
20+
21+
tm Organizacao::getDataNascimento()
22+
{
23+
return this->dataNascimento;
24+
}
25+
26+
void Organizacao::setDataNascimento(tm dataNas)
27+
{
28+
this->dataNascimento = dataNas;
29+
}
30+
31+
string Organizacao::getRazaoSocial()
32+
{
33+
return this->razaoSocial;
34+
}
35+
36+
void Organizacao::setRazaoSocial(string razaoSocial)
37+
{
38+
this->razaoSocial = razaoSocial;
39+
}
40+
41+
string Organizacao::getCNPJ()
42+
{
43+
return this->CNPJ;
44+
}
45+
46+
void Organizacao::setCNPJ(string CNPJ)
47+
{
48+
this->CNPJ = CNPJ;
49+
}
50+
51+
Organizacao::~Organizacao()
52+
{
53+
cout << "Organizacao deletada." << endl;
54+
}

cpp/lista2jordana/Organizacao.hpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#ifndef _ORGANIZACAO_
2+
#define _ORGANIZACAO_
3+
#include <iostream>
4+
#include <string>
5+
#include <vector>
6+
#include <ctime>
7+
#include "Cliente.hpp"
8+
9+
using namespace std;
10+
11+
class Organizacao
12+
{
13+
private:
14+
string nomeFantasia;
15+
string razaoSocial;
16+
string CNPJ;
17+
18+
public:
19+
Organizacao(string nomeFantasia, string razaoSocial, string CNPJ);
20+
~Organizacao();
21+
22+
string getNomeFantasia();
23+
void setNomeFantasia(string nomeFantasia);
24+
string getRazaoSocial();
25+
void setRazaoSocial(string razaoSocial);
26+
string getCNPJ();
27+
void setCNPJ(string CNPJ);
28+
}
29+
30+
#endif

cpp/lista2jordana/Pessoa.cpp

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#include "Pessoa.hpp"
2+
3+
Pessoa::Pessoa(string nome, string RG, string CPF)
4+
{
5+
this->setNome(nome);
6+
// this->setDataNascimento(dataNasc);
7+
this->setRG(RG);
8+
this->setCPF(CPF);
9+
}
10+
11+
string Pessoa::getNome()
12+
{
13+
return this->nome;
14+
}
15+
16+
void Pessoa::setNome(string nome)
17+
{
18+
this->nome = nome;
19+
}
20+
21+
tm Pessoa::getDataNascimento()
22+
{
23+
return this->dataNascimento;
24+
}
25+
26+
void Pessoa::setDataNascimento(tm dataNas)
27+
{
28+
this->dataNascimento = dataNas;
29+
}
30+
31+
string Pessoa::getRG()
32+
{
33+
return this->RG;
34+
}
35+
36+
void Pessoa::setRG(string RG)
37+
{
38+
this->RG = RG;
39+
}
40+
41+
string Pessoa::getCPF()
42+
{
43+
return this->CPF;
44+
}
45+
46+
void Pessoa::setCPF(string CPF)
47+
{
48+
this->CPF = CPF;
49+
}
50+
51+
Pessoa::~Pessoa()
52+
{
53+
cout << "Pessoa deletada." << endl;
54+
}

cpp/lista2jordana/Pessoa.hpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#ifndef _PESSOA_
2+
#define _PESSOA_
3+
#include <iostream>
4+
#include <string>
5+
#include <vector>
6+
#include <ctime>
7+
#include "Cliente.hpp"
8+
9+
using namespace std;
10+
11+
class Pessoa
12+
{
13+
private:
14+
string nome;
15+
tm dataNascimento;
16+
string RG;
17+
string CPF;
18+
public:
19+
Pessoa(string nome, string RG, string CPF);
20+
~Pessoa();
21+
22+
string getNome();
23+
void setNome(string nome);
24+
tm getDataNascimento();
25+
void setDataNascimento(tm dataNascimento);
26+
string getRG();
27+
void setRG(string RG);
28+
void setCPF(string CPF);
29+
string getCPF();
30+
}
31+
32+
#endif

cpp/lista2jordana/PessoaFisica.cpp

Whitespace-only changes.

cpp/lista2jordana/PessoaFisica.hpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef _PESSOAFISICA_
2+
#define _PESSOAFISICA_
3+
#include <iostream>
4+
#include <string>
5+
#include <vector>
6+
#include <ctime>
7+
#include "Pessoa.hpp"
8+
#include "Cliente.hpp"
9+
10+
using namespace std;
11+
12+
class PessoaFisica: Pessoa, Cliente
13+
{
14+
public:
15+
PessoaFisica(string nome, string RG, string CPF, string end, string tel, string email);
16+
~PessoaFisica();
17+
};
18+
19+
#endif

cpp/lista2jordana/PessoaJuridica.cpp

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#ifndef _PESSOAJURIDICA_
2+
#define _PESSOAJURIDICA_
3+
#include <iostream>
4+
#include <string>
5+
#include <vector>
6+
#include <ctime>
7+
#include "Pessoa.hpp"
8+
#include "Organizacao.hpp"
9+
10+
using namespace std;
11+
12+
class PessoaJuridica: Pessoa, Organizacao
13+
{
14+
public:
15+
PessoaJuridica(string nomeFantasia, string razaoSocial, string CNPJ, string end, string tel, string email);
16+
~PessoaJuridica();
17+
};
18+
19+
#endif

0 commit comments

Comments
 (0)