Skip to content

Commit

Permalink
Update Shape.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
paulaLes authored Jun 7, 2024
1 parent e5a4e3a commit 1bb7fe6
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions shapes/Shape.hpp
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
#pragma once

enum class Color : unsigned char{
White = 0,
Red,
Blue
enum class Color : unsigned char
{
RED,
BLUE,
GREEN
};

class Shape {
Color color = Color::White;
class Shape
{
public:
virtual ~Shape() {}
Shape() = default;
Shape(Color c);

virtual double getArea() const = 0;
virtual double getArea() const noexcept = 0;
virtual double getPerimeter() const = 0;
virtual void print() const;

protected:
Color color = Color::RED;
};

0 comments on commit 1bb7fe6

Please sign in to comment.