-
Notifications
You must be signed in to change notification settings - Fork 1
/
Conta.h
60 lines (47 loc) · 1.38 KB
/
Conta.h
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Conta.h
*
* Created on: 23 de set de 2019
* Author: rafaelamoreira
*/
#ifndef CONTA_H_
#define CONTA_H_
#include "Cliente.h"
#include "Movimentacao.h"
#include "SaldoDiaBase.h"
#include <vector>
class Conta {
protected:
int numConta;
double saldo;
Cliente *cliente;
std::vector<Movimentacao> movimentacoes;
static int proximoNumConta;
public:
//constructors
Conta();
Conta(Cliente *clienteNovo);
virtual ~Conta();
//Conta(const Conta &other);
//getters and setters
virtual const Cliente& getCliente() const;
virtual const std::vector<Movimentacao> getMovimentacoes();
virtual int getNumConta() const;
//static int getProximoNumConta();
virtual double getSaldo() const;
//Seta o ponteiro pro cliente
virtual void setCliente(Cliente *newCliente);
//methods
virtual bool debitar(double valor, std::string descricao) = 0;
virtual void creditar(double valor, std::string descricao) = 0;
virtual vector<Movimentacao> obterExtrato(std::string dataIni, std::string dataFim);
virtual vector<Movimentacao> obterExtrato(std::string dataIni);
virtual vector<Movimentacao> obterExtratoMesAtual();
virtual void write(std::ostream& out) const = 0;
virtual void removeElemento(int elemento) = 0 ;
virtual void adicionaElemento(SaldoDiaBase &db) = 0;
virtual void read(std::istream& in) = 0;
//Qual o tipo da conta
virtual string type() const = 0;
};
#endif /* CONTA_H_ */