-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathControladora.h
More file actions
67 lines (66 loc) · 2.41 KB
/
Copy pathControladora.h
File metadata and controls
67 lines (66 loc) · 2.41 KB
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
#pragma once
#include "HashTableUsuarios.h"
#include "ArbolPromociones.h"
#include "VectorProfesores.h"
#include "PilaPuntuaciones.h"
#include "ListaPreguntaRespuestas.h"
#include "Idioma.h"
#include "ArbolPagos.h"
#include "GrafoPlanEstudio.h"
using namespace System;
class Controladora : public Base
{
private:
HashTableUsuarios* usuario_registro;
VectorProfesores* profesor_registro;
PilaPuntuaciones* ranking;
Idioma* idioma_registro;
ListaPreguntaRespuestas* preguntas_respuestas;
ArbolPromociones* promociones_registro;
ArbolPagos* pagos_registros;
GrafoPlanEstudio* planEstudios_registro;
string opc;
public:
Controladora()
{
usuario_registro = new HashTableUsuarios();
profesor_registro = new VectorProfesores();
idioma_registro = new Idioma();
preguntas_respuestas = new ListaPreguntaRespuestas();
promociones_registro = new ArbolPromociones();
ranking = new PilaPuntuaciones(usuario_registro->retornarUsuarios());
pagos_registros = new ArbolPagos();
planEstudios_registro = new GrafoPlanEstudio();
}
void mostrarMenu()
{
do
{
cout << " ----------------- Menu de Opciones ------------" << "\n\n";
cout << " 1. Ingresar usuario " << "\n";
cout << " 2. Ingresar profesor " << "\n";
cout << " 3. Aprender idioma " << "\n";
cout << " 4. Puntuaciones " << "\n";
cout << " 5. Preguntas y Respuestas " << "\n";
cout << " 6. Promociones " << "\n";
cout << " 7. Pagos " << "\n";
cout << " 8. Planes de Estudio " << "\n";
cout << " 9. Salir " << "\n";
cout << " -----------------------------------------------" << "\n";
verificarOpcion(9);
if (*opcion == 1) usuario_registro->menuUsuarios();
if (*opcion == 2) profesor_registro->elegirProfesor();
if (*opcion == 3 && usuario_registro->retornarCantidad() > 0) idioma_registro->elegirIdioma(usuario_registro);
if (*opcion == 3 && usuario_registro->retornarCantidad() == 0) { cout << " Debe registrarse primero" << endl; }
if (*opcion == 4) ranking->elegirPuntuaciones();
if (*opcion == 5) preguntas_respuestas->MenuPreguntasRespuestas();
if (*opcion == 6) promociones_registro->menuPromocion();
if (*opcion == 7) pagos_registros->MenuPagos();
if (*opcion == 8) planEstudios_registro->menuPlanEstudio();
} while (*opcion != 9);
}
void run()
{
mostrarMenu();
}
};