

A polygon is a two-dimensional (2-D) closed figure made up of straight line segments.
In geometry, octagon is a polygon with 8 sides. If the lengths of all the sides and the measurement of all the angles are equal,
the octagon is called a regular octagon. In other words, sides of a regular octagon are congruent.
Each of the interior angle and the exterior angle measure 135° and 45° respectively, in a regular octagon.
Consider a regular octagon with each side a units, then
Perimeter of an Octagon = 8a
Area of an Octagon = 2a2 (1 + √2)
