# include <iostream>

using std::cin;
using std::cout;
using std::endl;
using std::string;

# define PI 3.1428571428

class Circle
{
private:
double radius;
public:
void setRadius();  // set the value of its data member 'radius' 
void computeAreaCirc(); // compute and display the area and circumference
Circle();  // Constructors of the class
~Circle(); // Destructor of the class
};
Circle::Circle()
{
radius = 0.0;
}
void Circle::setRadius()
{
radius = 5.6;  // set value of radius
}
void Circle::computeAreaCirc()
{
cout << "Area of circle is: " << PI * (radius * radius) << endl;
cout << "Circumference of circle is: " << 2 * PI * radius << endl;
}
Circle::~Circle()
{
}
class Rectangle
{
private:
double height;
double width;
public:
void setLength(); // set the value of its data member 'height'
void setWidth(); // set the value of its data member 'width'
void computeArea(); // compute and display area of the rectangle class
Rectangle(); // Constructors of the class
~Rectangle(); // Destructor of the class
};
Rectangle::Rectangle()
{
height = 0.0;
width = 0.0;
}
void Rectangle::setLength()
{
height = 5.0;  // set value of height or length
}
void Rectangle::setWidth()
{
width = 4.0;  // set value of width
}
void Rectangle::computeArea()
{
cout << "Area of Rectangle: " << height * width << endl;
}
Rectangle::~Rectangle()
{
}
main()
{
int run = 1;
string option, choice;
cout<<"*******************SCIENTIFIC-CALCULATOR*******************"<<endl;

while(run)
{
cout << "\nOPTION 1 for computing Area and Circumference of the circle" << endl;
cout << "OPTION 2 for computing Area of the Rectangle" << endl;
cout << "Select your desired option(1-2): ";
cin >> option;
if(option == "1")
{
Circle nCircle;
nCircle.setRadius();
nCircle.computeAreaCirc();
cout << "Do you want to perform any other calculation(Y/N):";
cin >> choice;
if(choice == "Y" || choice == "y")
{
continue;
}
else
{
break;
}
}
else if(option == "2")
{
Rectangle nRectangle;
nRectangle.setLength();
nRectangle.setWidth();
nRectangle.computeArea();
cout << "Do you want to perform anyother calculation(Y/N):";
cin >> choice;
if(choice == "Y" || choice == "y")
{
continue;
}
else
{
break;
}
}
else
{
cout << "Invalid Option!!, Option should be from (1-2)" << endl;
}
}
}





