title: Pentagon Project in c++ with classes
body: <p>Okay, so I need to create a Pentagon Project and I'm kind of Confused here.
  I mean, it works great but I'm missing one class that must have some code in it.</p>
  
  <p>Assignment is:</p>
  
  <p>Write a program and call it PentagonProject. Besides the file containing the main() funct. there should be two other classes, each in its own pair of files (.h; .cpp). One of the classes should be class MenuClass, and the other should be called Pentagon. There should be a user loop in main() that invokes MenuClass member-function DisplayMenu and so forth. The menu should allow the user to specify, as well as change, the dimensions of the instance of the Pentagon class, also known as an object. A pentagon shall be a regular (all sides are the same). A pentagon has five sides. We shall denote the length of the sides by s. Then perimeter, P, and area, A, of a pentagon are as follows.</p>
  
  <p>Equations:</p>
  
  <pre><code>P = 5s 
  
  A = s^2 sqrt ( of 25 + 10 sqrt (5) ) / (over) 4
  </code></pre>
  
  <p>The menu should allow the user to calculate the perimeter and the area of an instance of the Pentagon Class.  Your program should have a single Pentagon Object.</p>
  
  <hr>
  
  <p>So, that's being said, the program works great, but what I didn't get is what exactly and how exactly should I code in Pentagon Class. </p>
  
  <p>My PentagonProject (or main):</p>
  
  <pre><code>// PentagonProject.cpp : Defines the entry point for the console application.
  //
  
  #include "stdafx.h"
  #include &lt;iostream&gt;
  #include "MenuClass.h"
  
  using namespace std;
  
  int main()
  {
      Menu menu;
      do
      {
          menu.Display();
          menu.QueryUser();
          menu.ProcessCommand();
      }
      while(menu.Continue());
      return 0;
  }
  </code></pre>
  
  <p>This is how my MenuClass looks like:</p>
  
  <pre><code>//  ==================
  #include "StdAfx.h"
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  //  ==================
  
  //  ================
  //  Class Inclusions
  //  ================
  #include "MenuClass.h"
  #include "Math.h"
  //  ================
  
  //  ====================
  using namespace std;
  //  ====================
  
  //  ============
  //  Constructors
  //  ============
  
  //      ===================
  //      Default Constructor
  //      ====================
  Menu::Menu(void)
  {
      userMenuSelection = Quit;
  } // Constructor Menu
  //      =====================
  
  Menu::~Menu(void)
  {
      cout &lt;&lt; "====================================" &lt;&lt; endl;
  } // Destructor ~Menu
  //      =====================
  
  //      ==============================
  //      Accessor Member-Function Get()
  //      ==========================
  MenuChoices Menu::Get()
  {
      return userMenuSelection;
  } // Accessor Method Get
  //      ========================
  
  //      =============================
  //      Mutator Member-Function Set()
  //      ========================================
  void Menu::Set(MenuChoices newValue)
  {
      userMenuSelection = newValue;
  } // Mutator Method Set
  //      =======================
  
  //      ==========================
  //      Member-Function Display( )
  //      ==========================
  void Menu::Display()
  {
      cout &lt;&lt; "======================================" &lt;&lt; endl;
      cout &lt;&lt; "             MENU SELECTION           " &lt;&lt; endl;
      cout &lt;&lt; "======================================" &lt;&lt; endl;
      cout &lt;&lt; "1: Calculate the Perimeter of Pentagon" &lt;&lt; endl;
      cout &lt;&lt; "2: Calculate the Area of Pentagon" &lt;&lt; endl;
      cout &lt;&lt; "3: Quit" &lt;&lt; endl;
      cout &lt;&lt; "======================================" &lt;&lt; endl;
      cout &lt;&lt; endl;
  } // Member-Function Display
  //      ============================
  
  //      =========================
  //      Member-Function QueryUser
  //      =========================
  void Menu::QueryUser()
  {
      int selection;
      cout &lt;&lt; "Enter Menu Selection: ";
      cin &gt;&gt; selection;
      switch(selection)
      {
      case 1:
          userMenuSelection = Perimeter;
          break;
      case 2:
          userMenuSelection = Area;
          break;
      case 3:
          userMenuSelection = Quit;
      default:
          userMenuSelection = Quit;
      } // switch
      //          ===========
      cout &lt;&lt; endl;
  } // Method QueryUser()
  //      =======================
  
  //      =================
  //      Method Continue()
  //      ========================
  bool Menu::Continue()
  {
      return userMenuSelection != Quit;
  } // Method Continue
  //      ====================
  
  //      ==============================
  //      Member-Function ProcessCommand
  //      ==============================
  void Menu::ProcessCommand()
  {
      int numberA; // Length of Sides
      double area; // Area
      if(userMenuSelection == Quit)
      {
          cout &lt;&lt; "Thank you for using this type of program. Have a nice day!" &lt;&lt; endl;
      }
      else if(userMenuSelection != Quit)
      {
          cout &lt;&lt; "Please enter an integer value for the length of the sides: ";
          cin &gt;&gt; numberA;
          //              ==============================
          switch(userMenuSelection)
          {
          case Perimeter:
              cout &lt;&lt; "Perimeter = " &lt;&lt; (5 * numberA) &lt;&lt; endl;
              break;
          case Area:
              cout &lt;&lt; "Area = " &lt;&lt; numberA * numberA * sqrt(25.0 + 10.0 * sqrt(5.0)) / 4.0;
              break;
          default:
              cout &lt;&lt; "Warning: error state encountered." &lt;&lt; endl;
          }
          cout &lt;&lt; endl;
      }
  }
  
  // ========================
  </code></pre>
  
  <p>So.. how can you see the program works without Pentagon Class.. and my questions is what should I do in order to let this project work with both classes at a time</p>