Fixing some stuff

This commit is contained in:
MassiveAtoms
2019-07-06 11:52:01 -03:00
parent 01eb2d50a5
commit 70fcbc274b
11 changed files with 77 additions and 27 deletions

View File

@@ -11,12 +11,12 @@ using std::vector;
/*
enum classes make it easy to represent categories.
So you can use something like Verhicle_type::car instead of 2. but under the
So you can use something like Vehicle_type::car instead of 2. but under the
hood, it's still an int. This is here so you won't have to have global variables
for these categories, or worse, use magic numbers in the code.
*/
enum class Verhicle_type { bike = 1, small_car = 2, suv = 3, pickup = 4 };
enum class Vehicle_type { bike = 1, small_car = 2, suv = 3, pickup = 4 };
/*
Customer constructors do the same stuff as all the other constructors.
@@ -38,8 +38,8 @@ class Customer {
int id;
string name;
string password;
Customer(string name_, string password_, Verhicle_type verhicle_);
Customer(int id_, string name_, string password_, Verhicle_type verhicle_,
Customer(string name_, string password_, Vehicle_type vehicle_);
Customer(int id_, string name_, string password_, Vehicle_type vehicle_,
vector<Park_time> instances);
void clock_in(int s_id);
void clock_out(int s_id);
@@ -48,7 +48,7 @@ class Customer {
void delete_db();
void gen_monthly();
Verhicle_type verhicle;
Vehicle_type vehicle;
private:
vector<Park_time> park_instances;

9
headers/Interface.h Normal file
View File

@@ -0,0 +1,9 @@
#include "Query.h"
using std::cin;
void interface();
void interface_member();
void interface_admin();

View File

@@ -18,6 +18,7 @@ class Park_spot {
int id;
bool taken;
int parked_customer;
Park_spot();
Park_spot(int id_, bool taken_, int parked);
void clock(Customer& c_customer);