From a82a54f081ce561e6bc6e9f82869f8b40a47e660 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Wed, 25 May 2022 19:59:16 +0300 Subject: Added my work from today's exam --- Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp (limited to 'Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp') diff --git a/Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp b/Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp new file mode 100644 index 0000000..1790a48 --- /dev/null +++ b/Year 1/Object-oriented Programming/Exam 2/ex2/main.cpp @@ -0,0 +1,18 @@ +#include "EventManager.h" +#include "EventWithFixedIntermission.h" +#include "EventWithIntermission.h" +#include "SimpleEvent.h" +#include + +int main() { + EventManager es(3); + SimpleEvent e1(10, 20); + EventWithFixedIntermission e2(30, 50, 35); + EventWithIntermission e3(90, 200, 95, 126); + + es.addEvent(&e1); + es.addEvent(&e2); + es.addEvent(&e3); + + std::cout << es.ongoingEvents(91) << std::endl; +} -- cgit v1.3.1-23-gd82d