### Calculator Program with Classes, Switch or If's ?

Hey guys im making a Calculator that returns Rectangles, Triangles or Circles Area. the thing is that i already set up everything but I need to do something to let the user coose between which Figure it needs to calc. How can would a class could be used for each figure?
HereĀ“s the code im sorry for the bothering im just a noob lol.

 ``1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162`` ``````#include #include using namespace std; int main (){ int choice = 0; cout<< ("Please enter: ") << endl; cout<< ("1) To calculate a Rectangle's Area.") << endl; cout<< ("2) To calculate a Triangles's Area.") << endl; cout<< ("3) To calculate a Circle's Area.") << endl; cin>> choice; //Rectangle double w, l, h, ArRect; cout << "Rectangle Area" << endl << ("Please enter the width, length and height."); cin >> w >> l >> h; ArRect = w * l * h; cout << ("The Area of the Box is: ") << ArRect << endl; system ("Pause"); return 0; // Triangle double l1, l2 ,l3, s, ArTri; cout<< ("Please enter the values for the three sides.") << endl; cin >> l1 >> l2 >> l3; s = ((l1 + l2 + l3)/2); ArTri = (sqrt(s*(s-l1) * (s -l2) *(s-l3))); cout << ("The Triangle's Area is: ") << ArTri << endl; system ("Pause"); } //Circle double ACir, R; double Pi = 3.1416; cout<< ("Please Enter the value of the Radius of the Circle.") << endl; cin>> R; ACir = (Pi * (pow(R,2))); cout<< ("The Circle's Area is: ") << endl; system ("Pause"); return 0; } ``````
 ``12345678910111213141516`` ``````switch(choice) { case 1: //Rectangle ... break; case 2: // Triangle ... break; case 3: //Circle .. break; default: std::cout << "wrong choice"; }``````