create an instance for hotel room
| 4 | using namespace std; |
| 5 | //create an instance for hotel room |
| 6 | class HotelRoom { |
| 7 | public: |
| 8 | HotelRoom(int bedrooms, int bathrooms) |
| 9 | : bedrooms_(bedrooms), bathrooms_(bathrooms) {} |
| 10 | //function to calculate the price of Hotel Room |
| 11 | virtual int get_price() { |
| 12 | return 50*bedrooms_ + 100*bathrooms_; |
| 13 | } |
| 14 | // initialize the variable for bedroooms and bathrooms |
| 15 | private: |
| 16 | int bedrooms_; |
| 17 | int bathrooms_; |
| 18 | }; |
| 19 | //create an instance for hotel apartment |
| 20 | class HotelApartment : public HotelRoom { |
| 21 | public: |
nothing calls this directly
no outgoing calls
no test coverage detected