Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aluno #164 #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cliente.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Cliente{
string ESTADO;
string cep;

void print(); // imprime na tela os dados de um cliente cadastrado
void print(); //imprime na tela os dados de um cliente cadastrado

};

Expand Down
12 changes: 12 additions & 0 deletions Encomenda.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#include <iostream>
#include <string>
#include "Encomenda.hpp"

void Encomenda::print(){

std::cout << "[Remetente]" << endl;
remetente.print();
std::cout << "[Destinatário]" << endl;
dest.print();

}
9 changes: 1 addition & 8 deletions Encomenda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,7 @@ class Encomenda{
Cliente remetente;
Cliente dest;

void print(){

std::cout << "[Remetente]" << endl;
remetente.print();
std::cout << "[Destinatário]" << endl;
dest.print();
}

void print(); //imprime na tela os dados dos clientes remetente e destinatário
};

#endif
19 changes: 19 additions & 0 deletions EncomendaNormal.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <iostream>
#include <string>
#include "EncomendaNormal.hpp"

void EncomendaNormal::print(){
Encomenda::print();
std::cout << "[Encomenda Normal]" << endl
<< " Peso: " << PESO << endl
<< " Custo por kg: " << CUSTOkg << endl
<< " Custo total: " << T << endl;

}

double EncomendaNormal::calcula(){

double x = PESO * CUSTOkg;

return x;
}
18 changes: 2 additions & 16 deletions EncomendaNormal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,8 @@ class EncomendaNormal: public Encomenda{

public:

double calcula(){

double x = PESO * CUSTOkg;

return x;
}

void print(){

Encomenda::print();
std::cout << "[Encomenda Normal]" << endl;
std::cout << " Peso: " << PESO << endl
<< " Custo por kg: " << CUSTOkg << endl
<< " Custo total: " << T << endl;

}
double calcula(); //calcula o custo de uma Encomenda normal
void print(); //imprime os dados da Encomenda e clientes relacionados

};

Expand Down
21 changes: 21 additions & 0 deletions EncomendaRelampago.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <iostream>
#include <string>
#include "EncomendaRelampago.hpp"

double EncomendaRelampago::calcula(){

double x = PESO * CUSTOkg;
x += x * 0.25;

return x;
}

void EncomendaRelampago::print(){
Encomenda::print();
std::cout << "[Encomenda Relâmpago]" << endl
<< " Peso: " << PESO << endl
<< " Custo por kg: " << CUSTOkg << endl
<< " Taxa adicional: " << 0.25 << endl
<< " Custo total: " << T << endl;

}
20 changes: 2 additions & 18 deletions EncomendaRelampago.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,8 @@ class EncomendaRelampago: public Encomenda{

public:

double calcula(){

double x = PESO * CUSTOkg;
x += x * 0.25;

return x;
}

void print(){

Encomenda::print();
std::cout << "[Encomenda Relâmpago]" << endl;
std::cout << " Peso: " << PESO << endl
<< " Custo por kg: " << CUSTOkg << endl
<< " Taxa adicional: " << 0.25 << endl
<< " Custo total: " << T << endl;

}
double calcula(); //calcula o custo de uma Encomenda Relampago
void print(); //imprime os dados da Encomenda e clientes relacionados

};

Expand Down
Binary file added main
Binary file not shown.