-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
11dff4f
commit 0c11795
Showing
13 changed files
with
963 additions
and
332 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#ifndef ADDRESS | ||
#define ADDRESS | ||
|
||
#include <iostream> | ||
#include <cstdlib> | ||
#include <vector> | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <array> | ||
#include <set> | ||
#include <map> | ||
#include <cstring> | ||
#include <queue> | ||
#include <stack> | ||
#include <chrono> | ||
#include <random> | ||
#include <functional> | ||
#include <limits> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <filesystem> | ||
|
||
using namespace std; | ||
|
||
class Address | ||
{ | ||
private: | ||
string line1, line2; | ||
string city; | ||
string state; | ||
string pinCode; | ||
string country; | ||
|
||
public: | ||
Address(); | ||
void takeInput(); | ||
void print(); | ||
string addToStr(); | ||
void strToAdd(string str); | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#ifndef EMPLOYEE | ||
#define EMPLOYEE | ||
using namespace std; | ||
#include <string> | ||
|
||
#include "./person.hh" | ||
|
||
// class appointment; | ||
class Employee : public Person | ||
{ | ||
private: | ||
string type; | ||
int appointmentsBooked; | ||
// friend class appointment; | ||
|
||
public: | ||
Employee(); | ||
void fillMap(); | ||
void saveMap(); | ||
void addPerson(); | ||
void printDetails(); | ||
void printDetailsFromHistory(string extraDetails = ""); | ||
void getDetails(int rec = 0); | ||
void getDetailsFromHistory(); | ||
void removePerson(); | ||
}; | ||
#endif // !DOCTOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,9 @@ | ||
#ifndef GLOBAL | ||
#define GLOBAL | ||
#include <iostream> | ||
#include <cstdlib> | ||
#include <vector> | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <array> | ||
#include <set> | ||
#include <map> | ||
#include <cstring> | ||
#include <queue> | ||
#include <stack> | ||
#include <chrono> | ||
#include <random> | ||
#include <functional> | ||
#include <limits> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <filesystem> | ||
|
||
using namespace std; | ||
|
||
void pause() | ||
{ | ||
do | ||
{ | ||
cout << "\n"; | ||
} while (cin.get() != '\n'); | ||
do | ||
{ | ||
cout << "Press a key to continue..."; | ||
} while (cin.get() != '\n'); | ||
} | ||
|
||
int power(int n, int exp) | ||
{ | ||
int res = 1; | ||
while (exp) | ||
{ | ||
if (exp & 1) | ||
res *= n, exp--; | ||
else | ||
n *= n, exp >>= 1; | ||
} | ||
return res; | ||
} | ||
|
||
int strToNum(string s) | ||
{ | ||
int res = 0; | ||
for (int i = 0; i < s.size(); i++) | ||
res += ((s[s.size() - 1 - i] - '0') * power(10, i)); | ||
return res; | ||
} | ||
|
||
#endif | ||
#ifndef GLOBAL_HMS | ||
#define GLOBAL_HMS | ||
using namespace std; | ||
#include <string> | ||
|
||
extern int yyyymmdd; | ||
int power(int n = 1, int exp = 0); | ||
int strToNum(string s); | ||
#endif // !GLOBAL_HMS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#ifndef PERSON | ||
#define PERSON | ||
using namespace std; | ||
#include <string> | ||
|
||
#include "./address.hh" | ||
|
||
class Person // abstract class | ||
{ | ||
protected: | ||
int id; | ||
string firstName, lastName; | ||
char gender; | ||
int16_t age; | ||
string mobNumber; | ||
Address addr; | ||
string cat; | ||
int category; | ||
// category: 1:doctor; 2:patient; 3:nurse; 4:driver; | ||
|
||
public: | ||
Person(); | ||
virtual void fillMap() = 0; | ||
virtual void saveMap() = 0; | ||
virtual void addPerson(int16_t minAge = 0, int16_t maxAge = 1000); | ||
virtual void printDetails(); | ||
virtual void printDetailsFromHistory(); | ||
virtual void getDetails(int rec = 0) = 0; | ||
virtual void getDetailsFromHistory() = 0; | ||
virtual void removePerson() = 0; | ||
}; | ||
#endif // !PERSON |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include <iostream> | ||
#include <cstdlib> | ||
#include <vector> | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <array> | ||
#include <set> | ||
#include <map> | ||
#include <cstring> | ||
#include <queue> | ||
#include <stack> | ||
#include <chrono> | ||
#include <random> | ||
#include <functional> | ||
#include <limits> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <filesystem> | ||
|
||
using namespace std; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,86 @@ | ||
#ifndef TABLE_MANAGE | ||
#define TABLE_MANAGE | ||
|
||
#include <iostream> | ||
#include <cstdlib> | ||
#include <vector> | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <array> | ||
#include <set> | ||
#include <map> | ||
#include <cstring> | ||
#include <queue> | ||
#include <stack> | ||
#include <chrono> | ||
#include <random> | ||
#include <functional> | ||
#include <limits> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <filesystem> | ||
|
||
using namespace std; | ||
|
||
#define pause() \ | ||
do \ | ||
{ \ | ||
cout << "\n"; \ | ||
} while (cin.get() != '\n'); \ | ||
do \ | ||
{ \ | ||
cout << "Press a key to continue..."; \ | ||
} while (cin.get() != '\n') | ||
|
||
// class TimeTable | ||
// { | ||
// public: | ||
// int getDay(); | ||
// void setDay(int day); | ||
// void displayRoutine(std::string uname); | ||
|
||
// private: | ||
// int day = 0; | ||
// }; | ||
|
||
class Period | ||
{ | ||
public: | ||
void periodConstructor(int periodNo, int startTime, int endTime, std::string facultyId, std::string subId, int day, int totalPeriods) | ||
{ | ||
this->periodNo = periodNo; | ||
this->startTime = startTime; | ||
this->endTime = endTime; | ||
this->facultyId = facultyId; | ||
this->subId = subId; | ||
} | ||
void openFileChk(std::string uname); | ||
|
||
private: | ||
int periodNo; | ||
int startTime; | ||
int endTime; | ||
std::string facultyId; | ||
std::string subId; | ||
}; | ||
|
||
#ifndef TABLE_MANAGE | ||
#define TABLE_MANAGE | ||
|
||
#include <iostream> | ||
#include <cstdlib> | ||
#include <vector> | ||
#include <algorithm> | ||
#include <cmath> | ||
#include <array> | ||
#include <set> | ||
#include <map> | ||
#include <cstring> | ||
#include <queue> | ||
#include <stack> | ||
#include <chrono> | ||
#include <random> | ||
#include <functional> | ||
#include <limits> | ||
#include <fstream> | ||
#include <sstream> | ||
#include <filesystem> | ||
|
||
#include "./employee.hh" | ||
// #include "./patient.hh" | ||
// #include "./nurse.hh" | ||
// #include "./driver.hh" | ||
// #include "./ambulance.hh" | ||
// #include "./appointment.hh" | ||
|
||
#define ull unsigned long long | ||
|
||
using namespace std; | ||
|
||
class classStandard | ||
{ | ||
public: | ||
void classStandardCreate(std::string classStandard_fname); | ||
|
||
void periodConstructor(ull periodNo) | ||
{ | ||
} | ||
|
||
void displayRoutine(); | ||
|
||
classStandard(string classStandard_fname); | ||
|
||
private: | ||
ull periodNo; | ||
}; | ||
|
||
bool classStandardChk(std::string classStandard_fname); | ||
|
||
class table_manage | ||
{ | ||
private: | ||
//map<id, object> | ||
static map<int, Employee> employeeList; | ||
// static map<int, patient> patientsList; | ||
// static map<int, nurse> nursesList; | ||
// static map<int, driver> driversList; | ||
// static map<int, ambulance> ambulancesList; | ||
// static map<int, appointment> appointmentsList; | ||
|
||
static const int employeeLimit; | ||
// static const int nursesLimit; | ||
// static const int driversLimit; | ||
// static const int ambulancesLimit; | ||
// static const int appointmentsLimit; | ||
|
||
friend class Employee; | ||
// friend class patient; | ||
// friend class nurse; | ||
// friend class driver; | ||
// friend class ambulance; | ||
// friend class appointment; | ||
|
||
public: | ||
static void printEmployees(); | ||
// static void printPatients(); | ||
// static void printNurses(); | ||
// static void printDrivers(); | ||
// static void printAmbulances(); | ||
// static void printAppointments(); | ||
}; | ||
|
||
#endif |
Oops, something went wrong.