File tree Expand file tree Collapse file tree 3 files changed +55
-0
lines changed
Expand file tree Collapse file tree 3 files changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ //
2+ // Created by Esteban Parra on 9/5/19.
3+ //
4+
Original file line number Diff line number Diff line change 1+ //
2+ // Created by Esteban Parra on 9/5/19.
3+ //
4+
5+ #ifndef DRIVINGSIMULATOR_VEHICLE_H
6+ #define DRIVINGSIMULATOR_VEHICLE_H
7+
8+ #include < string> // std::string, std::stoi
9+
10+ using namespace std ;
11+
12+ class Vehicle {
13+
14+ private :
15+ string myBrand, myModel;
16+
17+ public:
18+ Vehicle (string brand = " unknown" , string model = " unknown" ) {
19+ setBrand (brand);
20+ setModel (model);
21+ }
22+
23+ string getBrand () {
24+ return myBrand;
25+ }
26+
27+ void setBrand (string brand) {
28+ myBrand = brand;
29+ }
30+
31+ string getModel () {
32+ return myModel;
33+ }
34+
35+ void setModel (string model) {
36+ myModel = model;
37+ }
38+
39+ string toString () {
40+ return getBrand () + " " + getModel ();
41+ }
42+ };
43+
44+
45+ #endif // DRIVINGSIMULATOR_VEHICLE_H
Original file line number Diff line number Diff line change 1+ #include < iostream>
2+
3+ int main () {
4+ std::cout << " Hello, World!" << std::endl;
5+ return 0 ;
6+ }
You can’t perform that action at this time.
0 commit comments