Tuesday, 12 May 2020

Chapter 13 // Exercise 8 - Principles & Practice Using C++

In this exercise I am using Visual Studio 2017 and the graphics files found here:
https://github.com/l-paz91/principles-practice/tree/master/Graphics%20Files

Chapter 13 // Exercise 8

Define a class Regular_hexagon (a regular hexagon is a six-sided polygon with all sides of equal length). Use the center and the distance from the center point as constructor arguments.

Github: https://github.com/l-paz91/principles-practice/tree/master/Chapter%2013/Exercise%208


Seeing as how in Exercise 11 of the last chapter I already made a function that can produce any regular polygon given a radius and number of sides, this was quite simple to adapt the code.


No comments:

Post a Comment