-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEncomenda.hpp
36 lines (26 loc) · 839 Bytes
/
Encomenda.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef Encomenda_H
#define Encomenda_H
#include "Cliente.hpp"
class Encomenda{
private:
double peso = 0.0;
double custoKg = 0.0;
double precoTotal = 0.0;
Cliente remetente;
Cliente destinatario;
public:
Encomenda(double peso, double custoKg, Cliente remetente, Cliente destinatario): peso(peso), custoKg(custoKg), remetente(remetente), destinatario(destinatario) {}
double getPeso() { return peso; }
double getCustoKg() { return custoKg; }
double getPrecoTotal() { return precoTotal; }
double calculaPrecoTotal() {
return getPeso() * getCustoKg();
}
virtual void printEncomenda(){
std::cout << "[Remetente]" << std::endl;
remetente.printCliente();
std::cout << "[Destinatário]" << std::endl;
destinatario.printCliente();
}
};
#endif