fork download
  1. #include <iostream>
  2. #include <vector>
  3. using namespace std;
  4.  
  5. class Compra{
  6. public:
  7. Compra();
  8. Compra(int vId, int vNumProd, vector<string> vProductos, float vTotal);
  9. void setId(int id);
  10. void setNumProd(int np);
  11. void setProductos(vector<string> prod);
  12. void setTotal(float tot);
  13. int getId();
  14. int getNumProd();
  15. vector<string> getProductos();
  16. float getTotal();
  17. void muestraCompra();
  18. private:
  19. int id;
  20. int numProd;
  21. vector<string> productos;
  22. float precioTotal;
  23. };
  24.  
  25. class Cliente{
  26. public:
  27. Cliente();
  28. Cliente(int vId, char vNombre, int vNumTel, char vTipoTarj, int vNumTarj);
  29. void setId(int id);
  30. void setNombre(char nom);
  31. void setNumTel(int nt);
  32. void setTipoTarj(char tt);
  33. void setNumTarj(int ntarj);
  34. int getId();
  35. char getNombre();
  36. int getNumTel();
  37. char getTipoTarj();
  38. int getNumTarj();
  39. void muestraCliente();
  40. void comprarProductos();
  41. void verProductos();
  42. void realizarPago();
  43. void agregarAlCarrito();
  44. void borrarDelCarrito();
  45. private:
  46. int id;
  47. char nombre;
  48. int numTel;
  49. char tipoTarj;
  50. int numTarj;
  51. };
  52.  
  53. class Productos{
  54. public:
  55. Productos();
  56. Productos(int vId, char vNombre, double vPrecio);
  57. void setId(int id);
  58. void setNombre(char nom);
  59. void setPrecio(double prec);
  60. int getId();
  61. char getNombre();
  62. double getPrecio();
  63. void muestraProductos();
  64. private:
  65. int id;
  66. char nombre;
  67. double precio;
  68. };
  69.  
  70.  
  71. class Tienda{
  72. public:
  73. Tienda();
  74. Tienda(int vId, char vNombre, vector<string> vInventario);
  75. void setId(int id);
  76. void setNombre(char nom);
  77. void setInventario(vector<string> inv);
  78. int getId();
  79. char getNombre();
  80. vector<string> getInventario();
  81. void muestraTienda();
  82. private:
  83. int id;
  84. char nombre;
  85. vector<string> inventario;
  86. };
  87.  
  88. int main() {
  89. // your code goes here
  90. return 0;
  91. }
Success #stdin #stdout 0s 5516KB
stdin
Standard input is empty
stdout
Standard output is empty