Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- using namespace std;
- class fila
- {
- public:
- fila(){aperta=false;NumPersone=0;};
- virtual void setstato(bool pronto);
- protected:
- vector<string>NomePersone;
- bool aperta;
- int NumPersone;
- };
- class filaposta:public fila
- {
- public:
- void setstato(bool aperta){this->aperta=aperta;};
- void visualizzafila()
- {
- cout<<NumPersone<<endl;
- for(string &x:NomePersone)
- cout<<x<<endl;
- };
- void inseriscipersone(string persona)
- {
- NomePersone.push_back(persona);
- NumPersone++;
- };
- };
- class filabanca:public fila
- {
- public:
- void setstato(bool aperta)
- {
- this->aperta=aperta;
- };
- void visualizzafila()
- {
- cout<<NumPersone<<endl;
- for(string &x:NomePersone)
- cout<<x<<endl;
- };
- void inseriscipersone(vector<string>Ingredienti)
- {
- for (int i=0;i<Ingredienti.size();i++)
- {
- NomePersone.push_back(Ingredienti.at(i));
- NumPersone++;
- }
- };
- };
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement