Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commitdc13118c73b1fe6b54892c5e0584a97707e12b2d (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 09:07:00 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 09:07:00 +0300
Filesc575fe0cd3c860c0df79b4bd50af99587270d455 /src
FMI-OOP-P1_TicketSystem-dc13118c73b1fe6b54892c5e0584a97707e12b2d.tar
FMI-OOP-P1_TicketSystem-dc13118c73b1fe6b54892c5e0584a97707e12b2d.tar.gz
FMI-OOP-P1_TicketSystem-dc13118c73b1fe6b54892c5e0584a97707e12b2d.zip
Parent8f501c925376f349cacf239c3670536787366a10 (diff)
Autocommit at 07.05.2022 @ 09:07
5 files changed, 4 insertions, 11 deletions
-rw-r--r--src/Models/Reservation.cpp9
-rw-r--r--src/Models/Reservation.h1
-rw-r--r--src/Services/EventService.cpp (renamed from src/Services/EventSystem.cpp)0
-rw-r--r--src/Services/EventService.h (renamed from src/Services/EventSystem.h)0
-rw-r--r--src/main.cpp5
diff --git a/src/Models/Reservation.cpp b/src/Models/Reservation.cpp
index 26278b2..50febd3 100644
--- a/src/Models/Reservation.cpp
+++ b/src/Models/Reservation.cpp
@@ -1,6 +1,5 @@
#include "Reservation.h"
#include <cstring>
-#include <ostream>
Reservation::Reservation() : Reservation(Ticket(), "", "") {}
@@ -8,12 +7,8 @@ Reservation::Reservation(const Ticket& ticket) : Reservation(ticket, "", "") {}
Reservation::Reservation(const Ticket& ticket, const char* password, const char* note) {
this->ticket = ticket;
- strcpy(this->password, password);
- strcpy(this->note, note);
-}
-
-bool Reservation::validPassword(const char* password) const {
- return !strcmp(this->password, password);
+ strncpy(this->password, password, PASSWORD_LEN);
+ strncpy(this->note, note, NOTE_LEN);
}
const Ticket& Reservation::get_ticket() const {
diff --git a/src/Models/Reservation.h b/src/Models/Reservation.h
index 1a415b5..936b6b5 100644
--- a/src/Models/Reservation.h
+++ b/src/Models/Reservation.h
@@ -18,7 +18,6 @@ public:
Reservation(const Ticket& ticket);
Reservation(const Ticket& ticket, const char* password, const char* note);
- bool validPassword(const char* password) const;
const Ticket& get_ticket() const;
void read(std::istream& istr);
diff --git a/src/Services/EventSystem.cpp b/src/Services/EventService.cpp
index 95bd1c4..95bd1c4 100644
--- a/src/Services/EventSystem.cpp
+++ b/src/Services/EventService.cpp
diff --git a/src/Services/EventSystem.h b/src/Services/EventService.h
index 4eeac61..4eeac61 100644
--- a/src/Services/EventSystem.h
+++ b/src/Services/EventService.h
diff --git a/src/main.cpp b/src/main.cpp
index 8575d3b..ca47c56 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,5 @@
-#include "VenueConsoleUI.h"
-#include "Venue/Venue.h"
-#include "Venue/Hall.h"
+#include "UserInterface/VenueConsoleUI.h"
+#include "Models/Hall.h"
int main() {
Hall myVenueHalls[] = { Hall(1, 20, 30), Hall(2, 15, 15), Hall(3, 10, 20) };