-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRestaurant.cpp
More file actions
35 lines (30 loc) · 820 Bytes
/
Restaurant.cpp
File metadata and controls
35 lines (30 loc) · 820 Bytes
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
#include <iostream>
#include <stdlib.h>
using namespace std;
class Restaurant {
public:
Restaurant(string name, unsigned int capacity, string phone) {
restaurantName = name;
maximumCapacity = capacity;
phoneNumber = phone;
}
Restaurant() {
restaurantName = "";
maximumCapacity = 0;
phoneNumber = "";
}
void show() {
cout << restaurantName << " (" << maximumCapacity << "): " << phoneNumber << endl;
}
private:
string restaurantName = "";
unsigned int maximumCapacity = 0;
string phoneNumber = "";
};
int main(int argc, char *argv[]) {
Restaurant one;
Restaurant *two = new Restaurant("Cortese", 100, "(607)723-6477");
one.show();
two->show();
delete(two);
}