Advertisement
rozman50

Untitled

Mar 29th, 2019
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.60 KB | None | 0 0
  1. Calendar* myCalendar = new Calendar("Gasper");
  2.     Date monday(25, 3, 2019);
  3.     if (!myCalendar->addEvent(
  4.         new Event("Uvod v operacijske sisteme", "E-105",
  5.         DateTime(monday, Time(7)),
  6.         DateTime(monday, Time(9))))) {
  7.         std::cout << "Event not added!" << std::endl;
  8.     }
  9.     if (!myCalendar->addEvent(
  10.         new Event("Strokovna anglescina", "G2-P4",
  11.             DateTime(monday, Time(9)),
  12.             DateTime(monday, Time(11))))) {
  13.         std::cout << "Event not added!" << std::endl;
  14.     }
  15.     if (!myCalendar->addEvent(
  16.         new Event("Strokovna anglescina", "G2-P4",
  17.             DateTime(monday, Time(11)),
  18.             DateTime(monday, Time(12))))) {
  19.         std::cout << "Event not added!" << std::endl;
  20.     }
  21.     if (!myCalendar->addEvent(
  22.         new Event("Programiranje", "G2-P3",
  23.             DateTime(monday, Time(15)),
  24.             DateTime(monday, Time(17))))) {
  25.         std::cout << "Event not added!" << std::endl;
  26.     }
  27.  
  28.     Date tuesday(26, 3, 2019);
  29.     if (!myCalendar->addEvent(
  30.         new Event("Podatkovne strukture", "E-105",
  31.             DateTime(tuesday, Time(10)),
  32.             DateTime(tuesday, Time(13))))) {
  33.         std::cout << "Event not added!" << std::endl;
  34.     }
  35.     if (!myCalendar->addEvent(
  36.         new Event("Programiranje II", "F-104",
  37.             DateTime(tuesday, Time(13)),
  38.             DateTime(tuesday, Time(16))))) {
  39.         std::cout << "Event not added!" << std::endl;
  40.     }
  41.  
  42.     Date wednesday(27, 3, 2019);
  43.     if (!myCalendar->addEvent(
  44.         new Event("Organizacija in arhitektura racunalnikov", "G2-P02",
  45.             DateTime(wednesday, Time(7)),
  46.             DateTime(wednesday, Time(9))))) {
  47.         std::cout << "Event not added!" << std::endl;
  48.     }
  49.     if (!myCalendar->addEvent(
  50.         new Event("Uvod v operacijske sisteme", "F-103",
  51.             DateTime(wednesday, Time(11)),
  52.             DateTime(wednesday, Time(13))))) {
  53.         std::cout << "Event not added!" << std::endl;
  54.     }
  55.     if (!myCalendar->addEvent(
  56.         new Event("Osnove algoritmov", "G2-P1",
  57.             DateTime(wednesday, Time(13)),
  58.             DateTime(wednesday, Time(15))))) {
  59.         std::cout << "Event not added!" << std::endl;
  60.     }
  61.     if (!myCalendar->addEvent(
  62.         new Event("Osnove algoritmov", "F-103",
  63.             DateTime(wednesday, Time(15)),
  64.             DateTime(wednesday, Time(18))))) {
  65.         std::cout << "Event not added!" << std::endl;
  66.     }
  67.  
  68.     Date thursday(28, 3, 2019);
  69.     if (!myCalendar->addEvent(
  70.         new Event("Organizacija in arhitektura racunalnikov", "F-102",
  71.             DateTime(thursday, Time(10)),
  72.             DateTime(thursday, Time(12))))) {
  73.         std::cout << "Event not added!" << std::endl;
  74.     }
  75.  
  76.     Date friday(29, 3, 2019);
  77.     if (!myCalendar->addEvent(
  78.         new Event("Podatkovne strukture", "F-102",
  79.             DateTime(friday, Time(10)),
  80.             DateTime(friday, Time(12))))) {
  81.         std::cout << "Event not added!" << std::endl;
  82.     }
  83.  
  84.     std::cout <<myCalendar->toString() <<std::endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement