diff --git a/.cproject b/.cproject
index b672d91..de1db8d 100644
--- a/.cproject
+++ b/.cproject
@@ -5,14 +5,14 @@
-
+
-
+
@@ -25,7 +25,7 @@
-
+
@@ -35,9 +35,9 @@
-
@@ -67,6 +67,11 @@
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.settings/language.settings.xml b/.settings/language.settings.xml
index 56952ee..4eb981b 100644
--- a/.settings/language.settings.xml
+++ b/.settings/language.settings.xml
@@ -5,7 +5,7 @@
-
+
diff --git a/.settings/org.eclipse.cdt.core.prefs b/.settings/org.eclipse.cdt.core.prefs
index c12b93b..39984cf 100644
--- a/.settings/org.eclipse.cdt.core.prefs
+++ b/.settings/org.eclipse.cdt.core.prefs
@@ -1,3 +1,8 @@
+doxygen/doxygen_new_line_after_brief=true
+doxygen/doxygen_use_brief_tag=false
+doxygen/doxygen_use_javadoc_tags=true
+doxygen/doxygen_use_pre_tag=false
+doxygen/doxygen_use_structural_commands=false
eclipse.preferences.version=1
org.eclipse.cdt.core.formatter.alignment_for_arguments_in_method_invocation=16
org.eclipse.cdt.core.formatter.alignment_for_assignment=16
diff --git a/Debug/myCode/main.o b/Debug/myCode/main.o
deleted file mode 100644
index ab1f9b2..0000000
Binary files a/Debug/myCode/main.o and /dev/null differ
diff --git a/Debug/studentDB.exe b/Debug/studentDB.exe
deleted file mode 100644
index 18d2c71..0000000
Binary files a/Debug/studentDB.exe and /dev/null differ
diff --git a/local_json_fetch.py b/local_json_fetch.py
new file mode 100644
index 0000000..fdcaa4f
--- /dev/null
+++ b/local_json_fetch.py
@@ -0,0 +1,65 @@
+from flask import Flask, jsonify
+from faker import Faker
+import random
+import datetime
+
+app = Flask(__name__)
+fake = Faker()
+
+def safe_fake_date(start_year=1971, end_year=2015):
+ while True:
+ dt = fake.date_time_between(start_date='-80y', end_date='-10y')
+ if dt.year >= start_year:
+ return dt
+
+@app.route('/generate', methods=['GET'])
+def generate_user():
+ dob = safe_fake_date()
+ reg = fake.date_time_between(start_date='-10y', end_date='now')
+
+ user_data = {
+ "cell": fake.phone_number(),
+ "dateOfBirth": {
+ "date": dob.day,
+ "day": dob.weekday(),
+ "hours": dob.hour,
+ "minutes": dob.minute,
+ "month": dob.month - 1,
+ "seconds": dob.second,
+ "time": int(dob.timestamp() * 1000),
+ "timezoneOffset": -60,
+ "year": dob.year - 1900
+ },
+ "email": fake.email(),
+ "gender": random.choice(["male", "female"]),
+ "location": {
+ "city": fake.city().lower(),
+ "postCode": fake.postcode(),
+ "state": fake.state().lower(),
+ "street": fake.street_address()
+ },
+ "name": {
+ "firstName": fake.first_name().lower(),
+ "lastName": fake.last_name().lower(),
+ "title": fake.prefix()
+ },
+ "nationality": fake.country_code(),
+ "phone": fake.phone_number(),
+ "picture": "...",
+ "registrationDate": {
+ "date": reg.day,
+ "day": reg.weekday(),
+ "hours": reg.hour,
+ "minutes": reg.minute,
+ "month": reg.month - 1,
+ "seconds": reg.second,
+ "time": int(reg.timestamp() * 1000),
+ "timezoneOffset": -60,
+ "year": reg.year - 1900
+ }
+ }
+
+ return jsonify(user_data)
+
+if __name__ == '__main__':
+ app.run(port=4242)
diff --git a/myCode/Address.cpp b/myCode/Address.cpp
new file mode 100644
index 0000000..7927f33
--- /dev/null
+++ b/myCode/Address.cpp
@@ -0,0 +1,65 @@
+#include "Address.h"
+#include
+#include
+#include
+
+using namespace std;
+
+Address::Address()
+{
+}
+
+Address::Address(std::string street, unsigned short postalCode, std::string cityName, std::string additionalInfo)
+{
+ this->street = street;
+ this->postalCode = postalCode;
+ this->cityName = cityName;
+ this->additionalInfo = additionalInfo;
+}
+
+Address::~Address()
+{
+}
+
+const std::string& Address::getAdditionalInfo() const
+{
+ return additionalInfo;
+}
+
+const std::string& Address::getCityName() const
+{
+ return cityName;
+}
+
+unsigned short Address::getPostalCode() const
+{
+ return postalCode;
+}
+
+const std::string& Address::getStreet() const
+{
+ return street;
+}
+
+void Address::write(std::ostream &out) const
+{
+ out << street << ';' << postalCode << ';' << cityName << ';' << additionalInfo << "\n";
+}
+
+void Address::read(std::istream &in)
+{
+ string line;
+
+ getline(in, street, ';');
+ getline(in, line, ';');
+ postalCode = static_cast(stoi(line)); // Convert string to unsigned short
+ getline(in, cityName, ';');
+ if (in.peek() == '\n') {
+ additionalInfo = ""; // Explicitly set to empty
+ }
+ else
+ {
+ getline(in, additionalInfo);
+ }
+
+}
diff --git a/myCode/Address.h b/myCode/Address.h
new file mode 100644
index 0000000..bfa87b8
--- /dev/null
+++ b/myCode/Address.h
@@ -0,0 +1,33 @@
+#ifndef ADRESS_H
+#define ADRESS_H
+
+#include
+
+class Address
+{
+
+private:
+
+ std::string street;
+ unsigned short postalCode;
+ std::string cityName;
+ std::string additionalInfo;
+
+public:
+
+ Address();
+ Address(std::string street, unsigned short postalCode, std::string cityName, std::string additionalInfo);
+ ~Address();
+
+ const std::string& getAdditionalInfo() const;
+ const std::string& getCityName() const;
+ unsigned short getPostalCode() const;
+ const std::string& getStreet() const;
+
+ void write(std::ostream& out) const; //write attributes to os stream
+ void read(std::istream& in);
+
+
+};
+
+#endif
diff --git a/myCode/BlockCourse.cpp b/myCode/BlockCourse.cpp
new file mode 100644
index 0000000..a6ff7d8
--- /dev/null
+++ b/myCode/BlockCourse.cpp
@@ -0,0 +1,132 @@
+#include "BlockCourse.h"
+#include
+#include
+#include
+
+using namespace std;
+
+BlockCourse::BlockCourse()
+{
+}
+
+BlockCourse::BlockCourse(unsigned int courseKey, std::string title, std::string major, float creditPoints)
+: Course(courseKey,title,major,creditPoints) {}
+
+BlockCourse::~BlockCourse()
+{
+}
+
+const Poco::Data::Time& BlockCourse::getStartTime() const
+{
+ return startTime;
+}
+
+const Poco::Data::Time& BlockCourse::getEndTime() const
+{
+ return endTime;
+}
+
+const Poco::Data::Date& BlockCourse::getStartDate() const
+{
+ return startDate;
+}
+
+const Poco::Data::Date& BlockCourse::getEndDate() const
+{
+ return endDate;
+}
+
+void BlockCourse::setStartTime(const Poco::Data::Time &startTime)
+{
+ this->startTime = startTime;
+}
+
+void BlockCourse::setEndTime(const Poco::Data::Time &endTime)
+{
+ this->endTime = endTime;
+}
+
+void BlockCourse::setStartDate(const Poco::Data::Date &startDate)
+{
+ this->startDate = startDate;
+}
+
+void BlockCourse::setEndDate(const Poco::Data::Date &endDate)
+{
+ this->endDate = endDate;
+}
+
+void BlockCourse::write(std::ostream &out) const
+{
+ out << "B;";
+
+ Course::write(out);
+
+ out << startDate.day() << '.' << startDate.month() << '.' << startDate.year() << ';';
+ out << endDate.day() << '.' << endDate.month() << '.' << endDate.year() << ';';
+ out << startTime.hour() << '.' << startTime.minute() << '.' << startTime.second();
+ out << endTime.hour() << '.' << endTime.minute() << '.' << endTime.second()<< "\n";
+}
+
+void BlockCourse::read(std::istream &in)
+{
+ string line;
+ string startTimeStr, endTimeStr, startDateStr, endDateStr;
+ int day, month, year;
+ int startHour, startMinute, startSecond, endHour, endMinute, endSecond;
+
+ Course::read(in);
+
+ getline(in, startDateStr, ';');
+ istringstream dateStreamStart(startDateStr);
+ getline(dateStreamStart, line, '.');
+
+ day = stoi(line);
+ getline(dateStreamStart, line, '.');
+
+ month = stoi(line);
+ getline(dateStreamStart, line, '.');
+
+ year = stoi(line);
+ startDate = Poco::Data::Date(year, month, day);
+
+ getline(in, endDateStr, ';');
+ istringstream dateStreamEnd(endDateStr);
+ getline(dateStreamEnd, line, '.');
+
+ day = stoi(line);
+ getline(dateStreamEnd, line, '.');
+
+ month = stoi(line);
+ getline(dateStreamEnd, line, '.');
+
+ year = stoi(line);
+ endDate = Poco::Data::Date(year, month, day);
+
+ getline(in, startTimeStr, ';');
+ istringstream timeStreamStart(startTimeStr);
+ getline(timeStreamStart, line, '.');
+
+ startHour = stoi(line);
+ getline(timeStreamStart, line, '.');
+
+ startMinute = stoi(line);
+ getline(timeStreamStart, line, '.');
+
+ startSecond = stoi(line);
+ startTime = Poco::Data::Time(startHour, startMinute, startSecond);
+
+ getline(in, endTimeStr, ';');
+ istringstream timeStreamEnd(endTimeStr);
+ getline(timeStreamEnd, line, '.');
+
+ endHour = stoi(line);
+ getline(timeStreamEnd, line, '.');
+
+ endMinute = stoi(line);
+ getline(timeStreamEnd, line, '.');
+
+ endSecond = stoi(line);
+ endTime = Poco::Data::Time(endHour, endMinute, endSecond);
+
+}
diff --git a/myCode/BlockCourse.h b/myCode/BlockCourse.h
new file mode 100644
index 0000000..4fc2575
--- /dev/null
+++ b/myCode/BlockCourse.h
@@ -0,0 +1,39 @@
+#ifndef BLOCKCOURSE_H
+#define BLOCKCOURSE_H
+
+#include
+#include
+
+#include "Course.h"
+
+class BlockCourse : public Course
+{
+
+private:
+
+ Poco::Data::Date startDate;
+ Poco::Data::Date endDate;
+ Poco::Data::Time startTime;
+ Poco::Data::Time endTime;
+
+public:
+
+ BlockCourse();
+ BlockCourse(unsigned int courseKey, std::string title, std::string major, float creditPoints);
+ ~BlockCourse();
+
+ const Poco::Data::Time& getStartTime() const;
+ const Poco::Data::Time& getEndTime() const;
+ const Poco::Data::Date& getStartDate() const;
+ const Poco::Data::Date& getEndDate() const;
+
+ void setStartTime(const Poco::Data::Time &startTime);
+ void setEndTime(const Poco::Data::Time &endTime);
+ void setStartDate(const Poco::Data::Date &startDate);
+ void setEndDate(const Poco::Data::Date &endDate);
+
+ void write(std::ostream& out) const; //write attributes to os stream
+ void read(std::istream& in);
+};
+
+#endif
diff --git a/myCode/CAddress.cpp b/myCode/CAddress.cpp
deleted file mode 100644
index 23b8ea8..0000000
--- a/myCode/CAddress.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CAddress.cpp
- *
- * Created on: 20 Jan 2022
- * Author: Mateo C. Querol
- */
-
-#include "CAddress.h"
-
-/*
- * CAddress constructor
- */
-CAddress::CAddress(std::string street, unsigned short postalCode, std::string cityName, std::string additionalInfo)
-{
- this->street = street;
- this->postalCode = postalCode;
- this->cityName = cityName;
- this->additionalInfo = additionalInfo;
-}
-
-/*
- * CAddress destructor
- */
-CAddress::~CAddress()
-{
-
-}
-
-/*
- * returns additional info
- */
-const std::string& CAddress::getAdditionalInfo() const
-{
- return this->additionalInfo;
-}
-
-/*
- * returns city name
- */
-const std::string& CAddress::getCityName() const
-{
- return this->cityName;
-}
-
-/*
- * returns postal code
- */
-unsigned short CAddress::getPostalCode() const
-{
- return this->postalCode;
-}
-
-/*
- * returns street
- */
-const std::string& CAddress::getStreet() const
-{
- return this->street;
-}
diff --git a/myCode/CAddress.h b/myCode/CAddress.h
deleted file mode 100644
index c4f37f9..0000000
--- a/myCode/CAddress.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#ifndef CADRESS_H
-#define CADRESS_H
-
-#include
-
-class CAddress {
-private:
-
- /*
- * street string
- */
- std::string street;
-
- /*
- * postal code unsigned short
- */
- unsigned short postalCode;
-
- /*
- * city name string
- */
- std::string cityName;
-
- /*
- * additional info string
- */
- std::string additionalInfo;
-
-public:
-
- /*
- * this is the constructor for the CAddress class
- */
- CAddress(std::string street, unsigned short postalCode, std::string cityName, std::string additionalInfo);
-
- /*
- * virtual destructor
- */
- virtual ~CAddress();
-
- /*
- * getter functions for the class members
- */
- const std::string& getAdditionalInfo() const;
- const std::string& getCityName() const;
- unsigned short getPostalCode() const;
- const std::string& getStreet() const;
-};
-#endif /* CADRESS_H */
diff --git a/myCode/CBlockCourse.cpp b/myCode/CBlockCourse.cpp
deleted file mode 100644
index ee96e47..0000000
--- a/myCode/CBlockCourse.cpp
+++ /dev/null
@@ -1,67 +0,0 @@
-#include "CBlockCourse.h"
-
-/*
- * CBlockCourse constructor
- * inherits from the CCourse class
- */
-CBlockCourse::CBlockCourse(unsigned int courseKey, std::string title, unsigned char major, float creditPoints)
-: CCourse(courseKey,title,major,creditPoints)
-{
- this->courseKey = courseKey;
- this->title = title;
- this->major = major;
- this->creditPoints = creditPoints;
-}
-
-/*
- * Empty destructor
- */
-CBlockCourse::~CBlockCourse()
-{
-
-}
-
-/*
- * CBlockCourse constructor
- * inherits from the CCourse class
- */
-
-const Poco::Data::Time& CBlockCourse::getStartTime() const
-{
- return startTime;
-}
-
-const Poco::Data::Time& CBlockCourse::getEndTime() const
-{
- return endTime;
-}
-
-const Poco::Data::Date& CBlockCourse::getStartDate() const
-{
- return startDate;
-}
-
-const Poco::Data::Date& CBlockCourse::getEndDate() const
-{
- return endDate;
-}
-
-void CBlockCourse::setStartTime(const Poco::Data::Time &startTime)
-{
- this->startTime = startTime;
-}
-
-void CBlockCourse::setEndTime(const Poco::Data::Time &endTime)
-{
- this->endTime = endTime;
-}
-
-void CBlockCourse::setStartDate(const Poco::Data::Date &startDate)
-{
- this->startDate = startDate;
-}
-
-void CBlockCourse::setEndDate(const Poco::Data::Date &endDate)
-{
- this->endDate = endDate;
-}
diff --git a/myCode/CBlockCourse.h b/myCode/CBlockCourse.h
deleted file mode 100644
index 4a99958..0000000
--- a/myCode/CBlockCourse.h
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef CBLOCKCOURSE_H
-#define CBLOCKCOURSE_H
-#include "CCourse.h"
-
-#include
-#include
-#include
-
-class CBlockCourse : public CCourse {
-private:
-
- /*
- * start and end time/date for the CBlockCourse
- * these are POCO time and date objects
- */
- Poco::Data::Time startTime;
- Poco::Data::Time endTime;
- Poco::Data::Date startDate;
- Poco::Data::Date endDate;
-public:
-
- /*
- * CBlockCourse constructor
- * inherits from the CCourse class
- */
- CBlockCourse(unsigned int courseKey, std::string title, unsigned char major, float creditPoints);
-
- /*
- * Empty destructor
- */
- ~CBlockCourse();
-
- /*
- * getter and setter functions for the class members
- */
- const Poco::Data::Time& getStartTime() const;
- const Poco::Data::Time& getEndTime() const;
- const Poco::Data::Date& getStartDate() const;
- const Poco::Data::Date& getEndDate() const;
-
- void setStartTime(const Poco::Data::Time &startTime);
- void setEndTime(const Poco::Data::Time &endTime);
- void setStartDate(const Poco::Data::Date &startDate);
- void setEndDate(const Poco::Data::Date &endDate);
-
-};
-#endif /* CBLOCKCOURSE_H */
diff --git a/myCode/CCourse.cpp b/myCode/CCourse.cpp
deleted file mode 100644
index f96dce1..0000000
--- a/myCode/CCourse.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "CCourse.h"
-
-using namespace std;
-/*
- * course class constructor
- */
-CCourse::CCourse(unsigned int courseKey, std::string title, unsigned char major, float creditPoints)
-{
- this->courseKey = courseKey;
- this->title = title;
- this->major = major;
- this->creditPoints = creditPoints;
-
-// this->majorById.insert({'A', "Automation"});
-// this->majorById.insert({'C', "Communications"});
-// this->majorById.insert({'E', "Embedded"});
-// this->majorById.insert({'P', "Power"});
-
-}
-
-CCourse::~CCourse()
-{
-
-}
-
-unsigned int CCourse::getCourseKey() const
-{
- return this->courseKey;
-}
-
-const std::string& CCourse::getTitle() const
-{
- return this->title;
-}
-
-unsigned char CCourse::getMajor() const
-{
- return this->major;
-}
-
-float CCourse::getCreditPoints() const
-{
- return this->creditPoints;
-}
-
-
diff --git a/myCode/CCourse.h b/myCode/CCourse.h
deleted file mode 100644
index 06baa80..0000000
--- a/myCode/CCourse.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef CCOURSE_H
-#define CCOURSE_H
-
-#include
-#include
-#include