-
Notifications
You must be signed in to change notification settings - Fork 0
/
SupplierParkingCard.h
52 lines (39 loc) · 1.29 KB
/
SupplierParkingCard.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef SupplierParkingCard_h
#define SupplierParkingCard_h
#include <iostream>
using namespace std;
#include "ParkingCard.h"
class SupplierParkingCard : public ParkingCard {
private:
string company;
public:
SupplierParkingCard();
SupplierParkingCard(int id, string name, string com);
string getCompany(){return company;}
void setCompany(string com){company = com;}
int calculateHoursToPay(Time, Time);
void print();
};
SupplierParkingCard::SupplierParkingCard():ParkingCard(){
company = "";
// Esto es para tenerlo listo la definicion se hara posteriormente
}
SupplierParkingCard::SupplierParkingCard(int id, string name, string com):ParkingCard(id, name){
company = com;
// Esto es para tenerlo listo la definicion se hara posteriormente
}
int SupplierParkingCard::calculateHoursToPay(Time start, Time end){
int time = start.elapsedTime(end);
int hours;
if (time % 60 != 0){
time += 60;
}
hours = time / 60;
// Este return 0 es solamente para que no me marque error la definicion correcta se hara posteriormente
return hours - 1;
}
void SupplierParkingCard::print(){
cout << "CardId: " << cardId << "\t Name: " << personName << "\t Company: " << company << endl;
// La definicion de hara posteriormente
}
#endif