Projeto Biblioteca POO - PV26465
Loading...
Searching...
No Matches
emprestimo.h
Go to the documentation of this file.
1#ifndef EMPRESTIMO_H
2#define EMPRESTIMO_H
3#include <ctime>
4#include "Leitor.h"
5#include "Livro.h"
6using namespace std;
18 private:
21 protected:
22
23
24 public:
25 Emprestimo(Livro *L, Leitor *LT);
26 virtual ~Emprestimo();
27 void calcularDataDevolucao(); //Calcula a data de devolução do livro
28 bool estaAtrasado(); //Verifica se o empréstimo está atrasado
29 float calcularMulta(); //Calcula a multa por atraso na devolução do livro
30 Livro* getLivro() const; //Obtém o livro emprestado
31 Leitor* getLeitor() const; //Obtém o leitor que realizou o empréstimo
32 void prorrogarEmprestimo(); //Prorroga a data de devolução do empréstimo
33 void simularAtraso(int dias); //Simula um atraso na devolução do livro
34 time_t dataEmprestimo; //Data em que o empréstimo foi realizado
35 time_t dataDevolucao; //Data prevista para devolução do livro
36};
37
38#endif // EMPRESTIMO_H
Classe que representa um empréstimo de livro na biblioteca.
Definition emprestimo.h:17
virtual ~Emprestimo()
Destrutor da classe Emprestimo.
Definition emprestimo.cpp:16
bool estaAtrasado()
Verifica se o empréstimo está atrasado.
Definition emprestimo.cpp:40
Leitor * getLeitor() const
Obtém o leitor que fez o empréstimo.
Definition emprestimo.cpp:73
Leitor * leitor
Definition emprestimo.h:19
Livro * getLivro() const
Obtém o livro emprestado.
Definition emprestimo.cpp:64
time_t dataEmprestimo
Definition emprestimo.h:34
Livro * livro
Definition emprestimo.h:20
float calcularMulta()
Calcula a multa do empréstimo.
Definition emprestimo.cpp:49
void calcularDataDevolucao()
Calcula a data de devolução do empréstimo.
Definition emprestimo.cpp:31
time_t dataDevolucao
Definition emprestimo.h:35
void prorrogarEmprestimo()
Prorroga o prazo de devolução do empréstimo.
Definition emprestimo.cpp:23
Emprestimo(Livro *L, Leitor *LT)
Construtor da classe Emprestimo.
Definition emprestimo.cpp:8
void simularAtraso(int dias)
Simula um atraso no empréstimo.
Definition emprestimo.cpp:82
Classe base para representar um leitor na biblioteca.
Definition Leitor.h:15
Classe base para representar um livro na biblioteca.
Definition Livro.h:15