NicolaDelPrete

sjf

Dec 5th, 2019
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.70 KB | None | 0 0
  1. #ifndef SCELTA_H_INCLUDED
  2. #define SCELTA_H_INCLUDED
  3.  
  4. #include "Nodo.h"
  5. #include <vector>
  6.  
  7. class scheduling
  8. {
  9.     std::vector <nodo*> lista;
  10. public:
  11.     scheduling(){;}
  12.     void inserimento();
  13.     void sjf();
  14.     ~scheduling(){;}
  15. };
  16.  
  17. void scheduling::inserimento()
  18. {
  19.     int n,in,f;
  20.     std::cout<<"Quante attivita' vuoi mettere: ";
  21.     std::cin>>n;
  22.     for(int i=0;i<n;i++)
  23.     {
  24.         system("CLS");
  25.         std::cout<<"Inserire la "<<i+1<<" attivita'"<<std::endl;
  26.         std::cout<<"Inizio :";
  27.         std::cin>>in;
  28.         std::cout<<"Fine :";
  29.         std::cin>>f;
  30.         nodo *niu=new nodo(i,f);
  31.         this->lista.push_back(niu);
  32.     }
  33. }
  34.  
  35.  
  36.  
  37. #endif // SCELTA_H_INCLUDED
Add Comment
Please, Sign In to add comment