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

a1564783a80bc1901aeac8a6b2a52f7e #135

Open
wants to merge 2 commits into
base: main
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
16 changes: 16 additions & 0 deletions Apartamento.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <iostream>
#include "Apartamento.hpp"

using namespace std;

double Apartamento::ValorComissãoApartamento(){
return ValorComissão();
}

void Apartamento::print(){
cout<< "[Apartamento]" << endl;
Imovel::print();
std::cout<< "Taxa de Comissão: " << 4 << "%" << std::endl
<< "Valor Comissão: R$ " << std::fixed << std::setprecision(2)<< Comissao << std::endl
<< "Valor de Venda: R$ " << std::fixed << std::setprecision(2)<< ValorTotal << std::endl;
}
30 changes: 3 additions & 27 deletions Apartamento.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,10 @@ class Apartamento : public Imovel {

public:

double valor() {
double ValorComissãoApartamento();

double v = AREA * VALORm2;
void print();

return v;

}

double comissao() {

double c = AREA * VALORm2;

return c * 0.04;

}

void print() {

std::cout << "[Apartamento]" << endl;
Imovel::print();
std::cout << "Area: " << AREA << endl
<< " Quartos: " << Q << endl
<< " Banheiros: " << B << endl
<< " Vagas: " << V << endl
<< "Taxa de Comissão: " << 4 << "%" << endl
<< "Valor Comissão: R$ " << fixed << setprecision(2) << C << endl
<< "Valor de Venda: R$ " << fixed << setprecision(2) << Valor << endl;
}
};
};

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

using namespace std;

double Casa::ValorComissaoCasa(){
return ValorComissão();
}

void Casa::print(){
cout<< "[Casa]" << endl;
Imovel::print();
std::cout<< "Taxa de Comissão: " << 6 << "%" << std::endl
<< "Valor Comissão: R$ " << std::fixed << std::setprecision(2)<< Comissao << std::endl
<< "Valor de Venda: R$ " << std::fixed << std::setprecision(2)<< ValorTotal << std::endl;
}
30 changes: 2 additions & 28 deletions Casa.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,9 @@ class Casa : public Imovel {

public:

double valor() {
double ValorComissaoCasa();

double v = AREA * VALORm2;

return v;

}

double comissao() {

double c = AREA * VALORm2;

return c * 0.06;

}

void print() {

std::cout << "[Casa]" << endl;
Imovel::print();
std::cout << "Area: " << AREA << endl
<< " Quartos: " << Q << endl
<< " Banheiros: " << B << endl
<< " Vagas: " << V << endl
<< "Taxa de Comissão: " << 6 << "%" << endl
<< "Valor Comissão: R$ " << fixed << setprecision(2) << C << endl
<< "Valor de Venda: R$ " << fixed << setprecision(2) << Valor << endl;

}
void print();

};

Expand Down
2 changes: 2 additions & 0 deletions Cliente.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#include <string>
#include "Cliente.hpp"

Cliente::Cliente() {}

void Cliente::print(){

std::cout << " Nome: " << NOME << endl
Expand Down
3 changes: 3 additions & 0 deletions Cliente.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#define CLIENTE_HPP

#include <string>
#include <iostream>
using namespace std;

class Cliente {
Expand All @@ -13,6 +14,8 @@ class Cliente {
string cep;
string telefone;

Cliente();

void print();
};

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

using namespace std;

double Cobertura::ValorComissaoCobertura(){
return ValorComissão();
}

void Cobertura::print(){
cout<< "[Cobertura]" << endl;
Imovel::print();
std::cout<< "Taxa de Comissão: " << 10 << "%" << std::endl
<< "Valor Comissão: R$ " << std::fixed << std::setprecision(2)<< Comissao << std::endl
<< "Valor de Venda: R$ " << std::fixed << std::setprecision(2)<< ValorTotal << std::endl;

}
31 changes: 4 additions & 27 deletions Cobertura.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,17 @@

#include "Imovel.hpp"
#include "Cliente.hpp"

using namespace std;

class Cobertura : public Imovel {

public:

double valor() {

double v = AREA * VALORm2;

return v;

}

double comissao() {
double ValorComissaoCobertura();

double c = AREA * VALORm2;

return c * 0.10;

}

void print() {

std::cout << "[Cobertura]" << endl;
Imovel::print();
std::cout << "Area: " << AREA << endl
<< " Quartos: " << Q << endl
<< " Banheiros: " << B << endl
<< " Vagas: " << V << endl
<< "Taxa de Comissão: " << 10 << "%" << endl
<< "Valor Comissão: R$ " << fixed << setprecision(2) << C << endl
<< "Valor de Venda: R$ " << fixed << setprecision(2) << Valor << endl;
}
void print();

};

#endif
Loading