Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. #ifndef PERSONA_H
  2. #define PERSONA_H
  3. #include <iostream>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include "persona.h"
  7. #include <string.h>
  8.  
  9. using namespace std;
  10.  
  11. class persona
  12. {
  13. public:
  14. persona();
  15. void capturar();
  16. void mostrar();
  17. void set_cp(int c);
  18. void set_nombre(string n);
  19. void set_ciudad(string c1);
  20. void set_domicilio(string d);
  21. void set_telefono(string t);
  22. void set_edad(int e);
  23.  
  24. int get_cp();
  25. string get_nombre();
  26. string get_ciudad();
  27. string get_domicilio();
  28. string get_telefono();
  29. int get_edad();
  30.  
  31.  
  32.  
  33. virtual ~persona();
  34. friend class nodo;
  35.  
  36. private:
  37. string nombre;
  38. string domicilio;
  39. string telefono;
  40. string ciudad;
  41. int cp;
  42. int edad;
  43.  
  44.  
  45. };
  46. class nodo
  47. {
  48. private:
  49. nodo *sig;
  50. persona elemento;
  51. public:
  52. nodo();
  53. nodo *getsig(){return sig;}
  54. persona getelemento(){return elemento;}
  55. void setsig(nodo *sig){this -> sig=sig;}
  56. void setelemento(persona elemento){this-> elemento=elemento;}
  57. friend class lista;
  58.  
  59. };
  60.  
  61. class lista{
  62.  
  63. private:
  64. nodo *actual;
  65. nodo *primero;
  66. nodo *ultimo;
  67. public:
  68. lista(){primero=NULL; actual= NULL; ultimo= NULL;}
  69. void insertar_ordenadamente();//ya
  70. void mostrar();//ya
  71. void buscar();//ya
  72. void vaciar_lista();//ya
  73. void eliminar();//ya
  74. bool lista_vacia(){return primero==NULL;}//ya
  75.  
  76. };
  77. #endif // PERSONA_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement