Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wall.cpp
- #include "wall.h"
- Wall::Wall(double width, double height)
- : width_(width)
- , height_(height)
- , color_(Color::WHITE) {
- }
- double Wall::GetHeight() const
- {
- return height_;
- }
- double Wall::GetWidth() const
- {
- return width_;
- }
- void Wall::SetColor(Color color)
- {
- color_ = color;
- }
- Wall::Color Wall::GetColor() const
- {
- return color_;
- }
- ***************************************************************************************************************************************
- wall.h
- class Wall {
- public:
- enum class Color { BLUE, GREEN, RED, WHITE, YELLOW };
- Wall(double width, double height);
- double GetHeight() const;
- double GetWidth() const;
- void SetColor(Color color);
- Color GetColor() const;
- private:
- double width_;
- double height_;
- Color color_;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement