-
Notifications
You must be signed in to change notification settings - Fork 2.9k
/
Copy pathUser.hpp
42 lines (35 loc) · 859 Bytes
/
User.hpp
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
#ifndef USER_HPP
#define USER_HPP
#include <string>
#include "Location.hpp"
enum class UserType {
RIDER,
DRIVER
};
class User {
private:
std::string userId;
std::string name;
std::string phone;
UserType type;
Location* currentLocation;
bool active;
double rating;
int totalRatings;
public:
User(std::string userId, std::string name, std::string phone, UserType type,
Location* location);
~User();
std::string getUserId() const;
std::string getName() const;
std::string getPhone() const;
UserType getType() const;
Location* getCurrentLocation() const;
bool isActive() const;
double getRating() const;
void updateLocation(Location* location);
void setActive(bool status);
void updateRating(double newRating);
void displayInfo() const;
};
#endif