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

d04207526593176dc23cba9dd75cc02b #128

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
43 changes: 0 additions & 43 deletions Apartamento.hpp

This file was deleted.

45 changes: 0 additions & 45 deletions Casa.hpp

This file was deleted.

42 changes: 0 additions & 42 deletions Cobertura.hpp

This file was deleted.

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
g++ src/*.cpp -Iinclude -o main.exe && mv main.exe build
Binary file added build/main.exe
Binary file not shown.
22 changes: 22 additions & 0 deletions include/Apartamento.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef APARTAMENTO_HPP
#define APARTAMENTO_HPP

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

using namespace std;

class Apartamento : private Imovel {
private:
const double taxa = 0.04;

public:
Apartamento(string _corr, double _area, int _q, int _b, int _v, double _vrm2, Cliente _vndr);

void print();
double valor();
double comissao();

};

#endif
22 changes: 22 additions & 0 deletions include/Casa.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef CASA_HPP
#define CASA_HPP

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

using namespace std;

class Casa : private Imovel {
private:
const double taxa = 0.06;

public:
Casa(string _corr, double _area, int _q, int _b, int _v, double _vrm2, Cliente _vndr);

void print();
double valor();
double comissao();

};

#endif
6 changes: 4 additions & 2 deletions Cliente.hpp → include/Cliente.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
using namespace std;

class Cliente {
public:
private:
string NOME;
string endereco;
string CIDADE;
string UF;
string cep;
string telefone;

public:
Cliente(string _nome, string _endr, string _cidd, string _uf, string _cep, string __tel);
Cliente(){};
void print();
};

Expand Down
21 changes: 21 additions & 0 deletions include/Cobertura.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#ifndef COBERTURA_HPP
#define COBERTURA_HPP

#include "Imovel.hpp"
#include "Cliente.hpp"
using namespace std;

class Cobertura : public Imovel {
private:
const double taxa = 0.10;


public:
Cobertura(string _corr, double _area, int _q, int _b, int _v, double _vrm2, Cliente _vndr);

void print();
double valor();
double comissao();
};

#endif
9 changes: 3 additions & 6 deletions Imovel.hpp → include/Imovel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
using namespace std;

class Imovel {

public:

double AREA;
int Q;
int B;
Expand All @@ -19,12 +21,7 @@ class Imovel {
Cliente vendedor;
string corretor;

void print() {
cout << "[Vendedor]" << endl;
vendedor.print();
cout << "[Corretor]" << endl;
cout << " " + corretor << endl;
}
void print();
};

#endif
Loading