2020-02-09 13:28:03 +01:00
|
|
|
|
/*
|
|
|
|
|
Fernando M<EFBFBD>ndez
|
|
|
|
|
https://fernmend.ddns.net
|
|
|
|
|
C++ | Clases y memoria din<EFBFBD>mica.
|
|
|
|
|
*/
|
|
|
|
|
|
2020-02-08 20:32:39 +01:00
|
|
|
|
#include "persona.h"
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
|
|
Persona::Persona() {
|
|
|
|
|
_nombre = "Empty";
|
|
|
|
|
_apellidos = "NULL NULL";
|
|
|
|
|
_NIF = "NULL";
|
|
|
|
|
_edad = "0";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Persona::Persona(std::string nombre, std::string apellidos, std::string NIF, std::string edad){
|
|
|
|
|
_nombre = nombre;
|
|
|
|
|
_apellidos = apellidos;
|
|
|
|
|
_NIF = NIF;
|
|
|
|
|
_edad = edad;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Persona::mostrar() {
|
|
|
|
|
cout << setw(10) << right
|
|
|
|
|
<< this->_nombre << setw(20)
|
|
|
|
|
<< this->_apellidos << setw(20)
|
|
|
|
|
<< this->_NIF << setw(15)
|
|
|
|
|
<< this->_edad;
|
|
|
|
|
}
|