ayuda practica1, creacion Makefile
This commit is contained in:
31
include/Cliente.h
Normal file
31
include/Cliente.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#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:
|
||||
Cliente(long int d, char *nom, Fecha f);
|
||||
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; }
|
||||
|
||||
void setNombre(char *nom);
|
||||
void setFecha(Fecha f);
|
||||
|
||||
bool operator==(Cliente c) const; // if (c1 ===c2)
|
||||
|
||||
};
|
||||
|
||||
ostream& operator<<(ostream &s, const Cliente &c); //funcion no amiga de la clase
|
||||
|
||||
#endif // CLIENTE_H
|
||||
Reference in New Issue
Block a user