Interface severe work in progress

This commit is contained in:
Joshua 2019-06-28 14:44:42 -03:00
parent 20c5e25619
commit cbfa60d7f5
2 changed files with 80 additions and 0 deletions

13
interface notes.txt Normal file
View File

@ -0,0 +1,13 @@
Class ticket bevat de parameters:
- Naam (=customer indien customer)
-Ids
- Voertuig categorie
- Categorie multiplier
- Clock in
- aantal uren
- clock_multiplier {=1 als aantal_uren!=0, =1.2 of iets duurder als de persoon anytime uitklokt}
- Verwezen parkeervak
- Verwachtte clock uit
- Werkelijke clock uit= tijdkosten+laatboete
- Tijdkosten=categorie_multiplier*aantal_uren*uur_prijs*clock_multiplier, indien verwachtte aantal_uren=0, dan aantal_uren=clock out-in
- laat = (werkelijke-verwachtte)*categorie_multiplier*uur_prijs*laat_multiplier

67
interfaces.cpp Normal file
View File

@ -0,0 +1,67 @@
#include <cstdlib>
#include <iostream>
#include <string>
void main_interface(void)
{
int selector=0;
std::cout<<"\nHello, There. Welcome to the Parking Area!";
std::cout<<"\nPlease select an applicable option:";
std::cout<<"\n[1]I am a Customer.";
std::cout<<"\n[2]I am a Member";
std::cout<<"\n[3]I am an employee";
std::cout<<"\n[4]Clock Out";
std::cout<<"\n[5]Log in as Admin";
std::cin>>selector;
switch(selector){
case 1:interface_customer();break;
case 2:interface_member();break;
case 3:interface_employee();break;
case 4:clock_out();break;
case 5:interface_admin();break;
}
}
void select_cartype(void)
{
std::cout<<"\nWhat type of vehicle do you want to park?";
std::cout<<"\n[1]Bicycle";
std::cout<<"\n[2]Motorbike/Motorcycle";
std::cout<<"\n[3]Small to Medium-sized car";
std::cout<<"\n[4]Large Car (gives you a bigger parking space)";
std::cin>>selector;
switch(selector){
case 1:;break;
case 2:;break;
case 3:;break;
case 4:;break;
}
void select_time(void)//tijd selecteren en omzetten in uren
{
int selector=0;
int duration_in_hours=0, m=0, x=0;
std::cout<<"\nHow long do you want to park?";
std::cout<<"\n[1]Clock out when leaving";
std::cout<<"\n[2]A couple hours";
std::cout<<"\n[3]A couple days";
std::cout<<"\n[4]A couple weeks";
std::cout<<"\n[5]A couple months";
std::cout<<"\n[6]A couple years";
std::cin>>selector;
switch(selector){
case 1:m=0;break;
case 2:m=1;break;
case 3:m=24;break;
case 4:m=168;break;
case 5:m=672;break;
case 6:m=8064;break;
cout<<"\nHow many?";
cin>>x;
duration_in_hours=x*m;
}
void interface_customer(void)
{
//constructors here
}