+1 678 648 4277 

Class Inheritance in C++

Designing a program that makes use of inheritance in C++ assignment help

Room.h #include #include classRoom { public: int*shape; double size; Room(int shape_[], double size_) : shape(shape_), size(size_) {} } HouseRoom.h #pragma once #include "Room.h" classHouseRoom:public Room { public: std::string color; // color of walls intn_windows; // number of windows HouseRoom(int shape[], double size, std::string color_, intn_windows_) : Room(shape, size), color(color_), n_windows(n_windows_) { } }; OfficeRoom.h #pragma once #include "Room.h" classOfficeRoom:public Room { public: std::string color; intn_windows; intn_desks; intn_chairs; OfficeRoom(int shape[], double size, std::string color_, intn_windows_, intn_desks_, intn_chairs_) : Room(shape, size), color(color_), n_windows(n_windows_), n_desks(n_desks_), n_chairs(n_chairs_) {} };