-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathocorrencia.hpp
55 lines (43 loc) · 1.16 KB
/
ocorrencia.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef OCORRENCIA_HPP
#define OCORRENCIA_HPP
#include "dataHora.hpp"
#include <iostream>
#include "verificacoesOcorrencia.hpp"
using namespace std;
typedef struct
{
string descricao;
DataHora horario;
string numeroApolice;
int id;
void imprimeOcorrencia()
{
cout << "\tDescrição da ocorrencia : " << descricao << endl;
cout << "\tHorario : ";
horario.data.mostraData();
cout << endl;
horario.hora.mostraHorario();
cout << "\tNumero de Apolice : " << numeroApolice << endl;
cout << "\t========================================\n";
}
bool inserirDescricao()
{
string descricaoInserida;
cout << "\n\tInsira a descrição do ocorrido : ";
getline(cin, descricaoInserida);
descricao = descricaoInserida;
return true;
}
bool inserirApolice()
{
string apoliceInserida;
do
{
cout << "\n\tInsira a apolice de seguro : ";
getline(cin, apoliceInserida);
} while (!verificaApolice(apoliceInserida));
numeroApolice = apoliceInserida;
return true;
}
} Ocorrencia;
#endif