Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. #include <iostream>
  2. #include <stack>
  3. #include <vector>
  4. #include <map>
  5. #include <queue>
  6. #include <cmath>
  7. #include <time.h>
  8. #include <string>
  9.  
  10. using namespace std;
  11.  
  12. class lavanderia
  13. {
  14. private:
  15. queue< stack<string> > linea;
  16. string duenno;
  17. public:
  18. lavanderia(string duenno)
  19. {
  20. this->duenno=duenno;
  21. }
  22. void agregarPila(stack<string> pila)
  23. {
  24. linea.push(pila);
  25. }
  26. stack<string> sacarPila()
  27. {
  28. stack<string> aux = linea.front();
  29.  
  30. linea.pop();
  31.  
  32. return aux;
  33. }
  34. void mostrarContenidoPila(int pos)
  35. {
  36. for(int i=0; i<linea.size() ;i++)
  37. {
  38. stack<string> aux = linea.front();
  39.  
  40. linea.push(aux);
  41.  
  42. linea.pop();
  43.  
  44. if(i == pos)
  45. {
  46. stack<string> aux2;
  47.  
  48. for(int j=0; j<aux.size(); j++)
  49. {
  50. cout<< aux.top()<<endl;
  51.  
  52. aux2.push(aux.top());
  53.  
  54. aux.pop();
  55. }
  56.  
  57. for(int j=0; j<aux2.size(); j++)
  58. {
  59. aux.push(aux2.top());
  60.  
  61. aux2.pop();
  62. }
  63. }
  64. }
  65.  
  66. }
  67. };
  68. class caso
  69. {
  70. public:
  71. string acusado;
  72. string jurado[10];
  73. string persecutor;
  74. };
  75. class tribunal
  76. {
  77. private:
  78. map< string , vector< caso *> > corte;
  79. public:
  80. void nombreJueces()
  81. {
  82. map< string , vector< caso *> >::iterator i;
  83.  
  84. for(i = corte.begin(); i!=corte.end(); ++i)
  85. {
  86. cout<<"juez "<<i->first<<endl;
  87. }
  88. }
  89. void imprimirCasos()
  90. {
  91. map< string , vector< caso *> >::iterator i;
  92.  
  93. for(i = corte.begin(); i!=corte.end(); ++i)
  94. {
  95. cout<<"juez "<<i->first<<endl;
  96.  
  97. cout<<"-----------------------------------"<<endl;
  98.  
  99. for(int j=0;j<i->second.size();i++)
  100. {
  101. cout<<"jurado caso de: "<<i->second.at(j)->acusado<<endl;
  102.  
  103. for(int p =0; p<10; p++)
  104. {
  105. cout<<"jurado caso de: "<<i->second.at(j)->jurado[p]<<endl;
  106. }
  107.  
  108. cout<<"-----------------------------------"<<endl;
  109. }
  110. }
  111. }
  112. };
  113. int main()
  114. {
  115. return 0;
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement