-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedificio.h
73 lines (54 loc) · 1.65 KB
/
edificio.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
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef EDIFICIO_H
#define EDIFICIO_H
#include <string>
#include <sstream>
#include "lista.h"
#include "errores.h"
#include "herramientas.h"
using namespace std;
const string STR_MINA = "mina";
const string STR_ASERRADERO = "aserradero";
const string STR_FABRICA = "fabrica";
const string STR_ESCUELA = "escuela";
const string STR_OBELISCO = "obelisco";
const string STR_YACIMIENTO = "yacimiento";
const string STR_P_ELECTRICA = "planta electrica";
struct Datos_edificio{
string nombre;
double costo_piedra;
double costo_madera;
double costo_metal;
int cantidad_construidos;
int maximos_permitidos;
bool brinda_material;
Lista<Coordenadas*> ubicaciones_construidos;
};
class Edificio{
protected:
// Atributos
string identificador;
public:
// Metodos
// pre: -
// pos: CONSTRUCTOR edificio
Edificio();
// pre: identificador valido (entre los que hay en la consigna)
// pos: CONSTRUCTOR con parametro
Edificio(string identificador);
// pre: -
// pos: DESTRUCTOR de edificios
virtual ~Edificio(){};
// pre: -
// pos: devuelve el tipo/nombre del edificio
virtual string obtener_tipo_edificio() = 0;
// pre: -
// pos: obtiene (en caso de poder brindar materiales) el identificador del material que brinda el edificio
virtual char obtener_material_brindado() = 0;
// pre: -
// pos: obtiene (en caso de poder brindar materiales) la cantidad de material que brinda el edificio
virtual double obtener_cantidad_material_brindado() = 0;
// pre: -
// pos: devuelve el identificador del edificio
string obtener_identificador();
};
#endif // EDIFICIO_H