Question: Fix these codes so they are able to debug and compile in Linux Circle.h code below #ifndef CIRCLE _ H #define CIRCLE _ H #include
Fix these codes so they are able to debug and compile in Linux
Circle.h code below
#ifndef CIRCLEH
#define CIRCLEH
#include
using namespace std;
class Circle
private:
double radius;radius of the circle
double area;area of the circle
double circumference;circumferencee of the circle
double pi; the value of pi
public:
Circleradius;areanew double;area;circumference new double;
void setraddouble radradius rad;;
double computearea
area pipowradius;return area;;
double computecircumference
circumferencepiradius;return circumference;
double checkraddouble rad
ifrad && rad!return true;elsereturn false;;
~Circle;
;
#endif
circle.cpp code below
#include
#include "circle.h
using namespace std;
int main
double usersradius; value to store users given radius value;
Circle firstcircle; define a pointer to a circle
firstcircle new Circle; allocate memory for the object and call the constructor
cout"This Program computes various metrics of a circle"usersradus;
firstcirclesetradusersradius;
cout"Area of circle is:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
