#ifndef _TABLA_FREC_HPP #define _TABLA_FREC_HPP // Constantes y tipos previos const int MAX_NUM_DATOS = 1000; // Interfaz del TAD tabla de frecuencias. Pre-declaraciones: struct Tabla; void inicializar(Tabla& t); bool anyadir(Tabla& t, int n); int total(const Tabla& t); int infoEnt(const Tabla& t, int n); int infoFrec(const Tabla& t, int n); // Declaración struct Tabla { friend void inicializar(Tabla& t); friend bool anyadir(Tabla& t, int n); friend int total(const Tabla& t); friend int infoEnt(const Tabla& t, int n); friend int infoFrec(const Tabla& t, int n); private: // Representación interna de los valores del TAD struct Frecuencia { int numero; int frec; }; Frecuencia elementos [MAX_NUM_DATOS]; int numElementos; }; #endif