Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <stack>
- #include <vector>
- #include <map>
- #include <queue>
- #include <cmath>
- #include <time.h>
- #include <string>
- using namespace std;
- class lavanderia
- {
- private:
- queue< stack<string> > linea;
- string duenno;
- public:
- lavanderia(string duenno)
- {
- this->duenno=duenno;
- }
- void agregarPila(stack<string> pila)
- {
- linea.push(pila);
- }
- stack<string> sacarPila()
- {
- stack<string> aux = linea.front();
- linea.pop();
- return aux;
- }
- void mostrarContenidoPila(int pos)
- {
- for(int i=0; i<linea.size() ;i++)
- {
- stack<string> aux = linea.front();
- linea.push(aux);
- linea.pop();
- if(i == pos)
- {
- stack<string> aux2;
- for(int j=0; j<aux.size(); j++)
- {
- cout<< aux.top()<<endl;
- aux2.push(aux.top());
- aux.pop();
- }
- for(int j=0; j<aux2.size(); j++)
- {
- aux.push(aux2.top());
- aux2.pop();
- }
- }
- }
- }
- };
- class caso
- {
- public:
- string acusado;
- string jurado[10];
- string persecutor;
- };
- class tribunal
- {
- private:
- map< string , vector< caso *> > corte;
- public:
- void nombreJueces()
- {
- map< string , vector< caso *> >::iterator i;
- for(i = corte.begin(); i!=corte.end(); ++i)
- {
- cout<<"juez "<<i->first<<endl;
- }
- }
- void imprimirCasos()
- {
- map< string , vector< caso *> >::iterator i;
- for(i = corte.begin(); i!=corte.end(); ++i)
- {
- cout<<"juez "<<i->first<<endl;
- cout<<"-----------------------------------"<<endl;
- for(int j=0;j<i->second.size();i++)
- {
- cout<<"jurado caso de: "<<i->second.at(j)->acusado<<endl;
- for(int p =0; p<10; p++)
- {
- cout<<"jurado caso de: "<<i->second.at(j)->jurado[p]<<endl;
- }
- cout<<"-----------------------------------"<<endl;
- }
- }
- }
- };
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement