Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

find the error in during the picture in order to make this program work #include #include circle.h using namespace std; int main() double users_radius;// value

image text in transcribedimage text in transcribed

find the error in during the picture in order to make this program work

#include #include "circle.h" using namespace std; int main() double users_radius;// value to store users given radius value; Circle * first_circle; // define a pointer to a circle first_circle = new Circle();// allocate memory for the object and call the constructor cout>users_radus; first_circle->set_rad(users_radius); coutcompute_circumference() #ifndef CIRCLE_H #define CIRCLE_H using namespace std; class Circle { private: double radius;//radius of the circle double * area;//area of the circle double * circumference;//circumferencee of the circle static const double pi=3.1415;// the value of pi public: Circle() {radius=0; area=new double; area=0; circumference= new double;} void set_rad(double rad) {radius = rad;}; double compute_area() {'area = (pi*pow(radius, 2.0));return *area;}; double compute_circumference {*(circumference+1)=2*pi*radius;return *circumference;} Circle(); #endif #include #include "circle.h" using namespace std; int main() double users_radius;// value to store users given radius value; Circle * first_circle; // define a pointer to a circle first_circle = new Circle();// allocate memory for the object and call the constructor cout>users_radus; first_circle->set_rad(users_radius); coutcompute_circumference() #ifndef CIRCLE_H #define CIRCLE_H using namespace std; class Circle { private: double radius;//radius of the circle double * area;//area of the circle double * circumference;//circumferencee of the circle static const double pi=3.1415;// the value of pi public: Circle() {radius=0; area=new double; area=0; circumference= new double;} void set_rad(double rad) {radius = rad;}; double compute_area() {'area = (pi*pow(radius, 2.0));return *area;}; double compute_circumference {*(circumference+1)=2*pi*radius;return *circumference;} Circle(); #endif

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What is the Disney service model?

Answered: 1 week ago