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

Commit 366f831

Browse files
committed
Tristão
1 parent 83288af commit 366f831

File tree

4 files changed

+123
-92
lines changed

4 files changed

+123
-92
lines changed

cpp/lista1jordana/Aluno.cpp

Lines changed: 15 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,53 @@
11
#include "Aluno.hpp"
2+
#include "Turma.hpp"
23

34
Aluno::Aluno()
45
{
56
this->matriculaInstituicao = "";
67
this->codigo = -1;
7-
this->CPF = "";
8-
this->RG = "";
9-
this->endereco = "";
10-
this->telefone = "";
11-
this->email = "";
12-
this->nome = "";
8+
this->setCPF("");
9+
this->setRG("");
10+
this->setEndereco("");
11+
this->setTelefone("");
12+
this->setEmail("");
13+
this->setNome("");
1314
this->qtdAlunos++;
1415
}
1516

1617
Aluno::~Aluno()
1718
{
18-
cout << "Aluno CANCELADO" < endl;
19+
this->qtdAlunos--;
20+
cout << "Aluno CANCELADO" << endl;
1921
}
2022

2123
void matricular(Turma t);
2224

2325
string Aluno::getMatriculaInstituicao()
2426
{
25-
return this.matriculaInstituicao;
27+
return this->matriculaInstituicao;
2628
}
2729

2830
void Aluno::setMatriculaInstituicao(string matriculaInstituicao)
2931
{
30-
this.matriculaInstituicao = matriculaInstituicao;
32+
this->matriculaInstituicao = matriculaInstituicao;
3133
}
3234

3335
int Aluno::getCodigo()
3436
{
35-
return this.codigo;
37+
return this->codigo;
3638
}
3739

3840
void Aluno::setCodigo(int codigo)
3941
{
40-
this.codigo = codigo;
41-
}
42-
43-
string Aluno::getCPF()
44-
{
45-
return this.CPF;
46-
}
47-
48-
void Aluno::setCPF(string CPF)
49-
{
50-
this.CPF = CPF;
51-
}
52-
53-
string Aluno::getRG()
54-
{
55-
return this.RG;
56-
}
57-
58-
void Aluno::setRG(string RG)
59-
{
60-
this.RG = RG;
61-
}
62-
63-
string Aluno::getEndereco()
64-
{
65-
return this.endereco;
66-
}
67-
68-
void Aluno::setEndereco(string endereco)
69-
{
70-
this.endereco = endereco;
71-
}
72-
73-
string Aluno::getTelefone()
74-
{
75-
return this.telefone;
76-
}
77-
78-
void Aluno::setTelefone(string telefone)
79-
{
80-
this.telefone = telefone;
81-
}
82-
83-
string Aluno::getEmail()
84-
{
85-
return this.email;
86-
}
87-
88-
void Aluno::setEmail(string email)
89-
{
90-
this.email = email;
91-
}
92-
93-
string Aluno::getNome()
94-
{
95-
return this.nome;
96-
}
97-
98-
void Aluno::setNome(string nome)
99-
{
100-
this.nome = nome;
42+
this->codigo = codigo;
10143
}
10244

10345
int Aluno::getQtdAlunos()
10446
{
105-
return this.qtdAlunos;
47+
return this->qtdAlunos;
10648
}
10749

10850
void Aluno::setQtdAlunos(int qtdAlunos)
10951
{
110-
this.qtdAlunos = qtdAlunos;
52+
this->qtdAlunos = qtdAlunos;
11153
}

cpp/lista1jordana/Aluno.hpp

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
class Aluno
1+
#include <iostream>
2+
#include "Pessoa.hpp"
3+
4+
using namespace std;
5+
6+
class Aluno:Pessoa
27
{
38
private:
49
string matriculaInstituicao;
510
int codigo;
6-
string CPF;
7-
string RG;
8-
string endereco;
9-
string telefone;
10-
string email;
11-
string nome;
1211
static int qtdAlunos;
1312

1413
public:
@@ -19,18 +18,6 @@ class Aluno
1918
void Aluno::setMatriculaInstituicao(string matriculaInstituicao);
2019
int Aluno::getCodigo();
2120
void Aluno::setCodigo(int codigo);
22-
string Aluno::getCPF();
23-
void Aluno::setCPF(string CPF);
24-
string Aluno::getRG();
25-
void Aluno::setRG(string RG);
26-
string Aluno::getEndereco();
27-
void Aluno::setEndereco(string endereco);
28-
string Aluno::getTelefone();
29-
void Aluno::setTelefone(string telefone);
30-
string Aluno::getEmail();
31-
void Aluno::setEmail(string email);
32-
string Aluno::getNome();
33-
void Aluno::setNome(string nome);
3421
int Aluno::getQtdAlunos();
3522
void Aluno::setQtdAlunos(int qtdAlunos);
3623

cpp/lista1jordana/Pessoa.cpp

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#include "Pessoa.hpp"
2+
3+
Pessoa::Pessoa()
4+
{
5+
6+
}
7+
8+
Pessoa::Pessoa()
9+
{
10+
11+
}
12+
13+
string Pessoa::getCPF()
14+
{
15+
return this->CPF;
16+
}
17+
18+
void Pessoa::setCPF(string CPF)
19+
{
20+
this->CPF = CPF;
21+
}
22+
23+
string Pessoa::getRG()
24+
{
25+
return this->RG;
26+
}
27+
28+
void Pessoa::setRG(string RG)
29+
{
30+
this->RG = RG;
31+
}
32+
33+
string Pessoa::getEndereco()
34+
{
35+
return this->endereco;
36+
}
37+
38+
void Pessoa::setEndereco(string endereco)
39+
{
40+
this->endereco = endereco;
41+
}
42+
43+
string Pessoa::getTelefone()
44+
{
45+
return this->telefone;
46+
}
47+
48+
void Pessoa::setTelefone(string telefone)
49+
{
50+
this->telefone = telefone;
51+
}
52+
53+
string Pessoa::getEmail()
54+
{
55+
return this->email;
56+
}
57+
58+
void Pessoa::setEmail(string email)
59+
{
60+
this->email = email;
61+
}
62+
63+
string Pessoa::getNome()
64+
{
65+
return this->nome;
66+
}
67+
68+
void Pessoa::setNome(string nome)
69+
{
70+
this->nome = nome;
71+
}

cpp/lista1jordana/Pessoa.hpp

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#include <iostream>
2+
3+
using namespace std;
4+
5+
class Pessoa
6+
{
7+
private:
8+
string CPF;
9+
string RG;
10+
string endereco;
11+
string telefone;
12+
string email;
13+
string nome;
14+
15+
public:
16+
Pessoa();
17+
~Pessoa();
18+
19+
string Pessoa::getCPF();
20+
void Pessoa::setCPF(string CPF);
21+
string Pessoa::getRG();
22+
void Pessoa::setRG(string RG);
23+
string Pessoa::getEndereco();
24+
void Pessoa::setEndereco(string endereco);
25+
string Pessoa::getTelefone();
26+
void Pessoa::setTelefone(string telefone);
27+
string Pessoa::getEmail();
28+
void Pessoa::setEmail(string email);
29+
string Pessoa::getNome();
30+
void Pessoa::setNome(string nome);
31+
}

0 commit comments

Comments
 (0)