ALL objects can be saved to db now
This commit is contained in:
21
main.cpp
21
main.cpp
@ -5,6 +5,8 @@
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
#include <thread>
|
||||
|
||||
/*
|
||||
Code strucure like this:
|
||||
class declarations zijn in /headers/class_naam.h, en definitions van de member
|
||||
@ -20,16 +22,25 @@ record die zegt dat een customer voor x tijd geparkeert heeft bij spot x, enz.
|
||||
De client clockt in en uit bij een spot.
|
||||
*/
|
||||
|
||||
void Wait(int sec)
|
||||
/*
|
||||
a wait function where 1 sec represents 1 hour irl.
|
||||
*/
|
||||
{
|
||||
std::this_thread::sleep_for(seconds{sec});
|
||||
}
|
||||
|
||||
|
||||
|
||||
using std::cout;
|
||||
|
||||
int main() {
|
||||
class Customer sagar{"nonsense", Verhicle_type::medium};
|
||||
class Customer sagar{"Sagar Ramsaransing", Verhicle_type::medium};
|
||||
sagar.update_db();
|
||||
Park_spot p1;
|
||||
p1.clock(&sagar);
|
||||
Wait(2);
|
||||
p1.clock(&sagar);
|
||||
|
||||
Park_spot p1{1};
|
||||
p1.clock(&sagar);
|
||||
p1.clock(&sagar);
|
||||
sagar.gen_monthly();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user