diff --git a/Classroom.cpp b/Classroom.cpp new file mode 100644 index 0000000..8fbbb8a --- /dev/null +++ b/Classroom.cpp @@ -0,0 +1,25 @@ +# include +# include +# include "Classroom.h" +using namespace std; + +Classroom::Classroom(int x, string y) { + seats = x; + location = y; +} + +void Classroom::setSeats(int x) { + seats = x; +} + +int Classroom::getSeats() { + return seats; +} + +void Classroom::setLocation(string y) { + location = y; +} + +string Classroom::getLocation() { + return location; +} diff --git a/Classroom.h b/Classroom.h new file mode 100644 index 0000000..9057576 --- /dev/null +++ b/Classroom.h @@ -0,0 +1,17 @@ +# include +# include +using namespace std; + +class Classroom { +public: + Classroom(int x, string y); + void setSeats(int x); + int getSeats(); + void setLocation(string y); + string getLocation(); + +private: + int seats; + string location; + +}; diff --git a/Room.cpp b/Room.cpp new file mode 100644 index 0000000..18c9c8f --- /dev/null +++ b/Room.cpp @@ -0,0 +1,24 @@ +# include +# include +# include +# include "Classroom.h" +using namespace std; + +int main() { + + vector room; + + room.push_back({50 , "Lesile Robinson Building"}); + room.push_back({ 40, "Roy Marshall Teaching Complex" }); + room.push_back({ 45, "Roy Marshall Teaching Complex" }); + room.push_back({ 60, "Clico Building" }); + + for (unsigned int i = 0; i < room.size(); i++) { + cout << "Information about Room " << i + 1 << "\n"; + cout << "Number of seats: " << room[i].getSeats() << "\n"; + cout << "Location: " << room[i].getLocation(); + cout << "\n"; + } + system("pause"); + return 0; +}