-
Notifications
You must be signed in to change notification settings - Fork 0
/
Restaurant.h
50 lines (39 loc) · 1022 Bytes
/
Restaurant.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
//
// Created by hloi on 10/26/2021.
//
#ifndef CSC109101BUSINESS_RESTAURANT_H
#define CSC109101BUSINESS_RESTAURANT_H
#include "Business.h"
#include <string>
using std::string;
using std::to_string;
class Restaurant : public Business {
public:
Restaurant(string name, string address, int rating=0, int seating=0) : Business(name, address) {
this->seating = seating;
this->rating = rating;
}
void SetRating(int userRating) {
rating = userRating;
}
void SetSeating(int seat) {
seating = seat;
}
int GetRating() const {
return rating;
}
string GetDescription() {
string s = Business::GetDescription();
s += " -- " + to_string(rating) + " -- " + to_string(seating);
return s;
}
void Print() {
Business::Print();
cout << "Seating: " << seating << endl;
cout << "Rating: " << rating << endl;
}
protected:
int rating;
int seating;
};
#endif //CSC109101BUSINESS_RESTAURANT_H