2025-11-03 09:56:12 +01:00
|
|
|
|
#ifndef CLIENTE_H
|
|
|
|
|
|
#define CLIENTE_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <iostream> //cin, cout
|
|
|
|
|
|
#include "Fecha.h"
|
|
|
|
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
//SI FALTA ALGUN METODO O FUNCION A<>ADIRLO...
|
|
|
|
|
|
class Cliente {
|
|
|
|
|
|
long int dni;
|
|
|
|
|
|
char *nombre;
|
|
|
|
|
|
Fecha fechaAlta;
|
|
|
|
|
|
public:
|
2025-11-09 22:10:03 +01:00
|
|
|
|
Cliente(long int d, const char *nom, Fecha f);
|
2025-11-03 09:56:12 +01:00
|
|
|
|
virtual ~Cliente();
|
|
|
|
|
|
Cliente& operator=(const Cliente& c);
|
|
|
|
|
|
|
|
|
|
|
|
long int getDni() const { return this->dni; }
|
|
|
|
|
|
const char* getNombre() const { return nombre; } //VIP devolver un puntero constante para evitar que desde el main() se puede modificar el nombre
|
|
|
|
|
|
Fecha getFecha() const { return fechaAlta; }
|
|
|
|
|
|
|
2025-11-09 22:10:03 +01:00
|
|
|
|
void setNombre(const char *nom);
|
2025-11-03 09:56:12 +01:00
|
|
|
|
void setFecha(Fecha f);
|
|
|
|
|
|
|
2025-11-09 22:10:03 +01:00
|
|
|
|
bool operator==(const Cliente& c) const; // if (c1 ===c2)
|
2025-11-03 09:56:12 +01:00
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
ostream& operator<<(ostream &s, const Cliente &c); //funcion no amiga de la clase
|
|
|
|
|
|
|
|
|
|
|
|
#endif // CLIENTE_H
|