e) Create an instance or object (cr1) of the class Circle f) Write statement to access/call member method setRadius using the object crl. g) Write statement to call method getArea using object crl. h)...


e) Create an instance or object (cr1) of the class Circle<br>f) Write statement to access/call member method setRadius<br>using the object crl.<br>g) Write statement to call method getArea using object crl.<br>h) Write statement to call all member methods through the<br>object cr2.<br>

Extracted text: e) Create an instance or object (cr1) of the class Circle f) Write statement to access/call member method setRadius using the object crl. g) Write statement to call method getArea using object crl. h) Write statement to call all member methods through the object cr2.
1. Analysis the following class definition e and answer the<br>following questions for the class definition<br>class Circle {<br>double<br>radius;<br>private double pi()<br>return 3.14;}<br>void setRadius(double x){<br>radius=x; }<br>double getArea(){<br>return pi()*radius*radius;}<br>double getCircum(){<br>return 2*pi()*radius;}<br>a) Class name is<br>b) Member variable(s):<br>variable(s)..<br>c) Is there any constructor in the class Circle?<br>Data type of member<br>If Yes, write name of the constructor and its<br>parameter..<br>d)<br>Member method<br>Return type Access<br>Parameters with data<br>Specifier<br>type<br>name<br>

Extracted text: 1. Analysis the following class definition e and answer the following questions for the class definition class Circle { double radius; private double pi() return 3.14;} void setRadius(double x){ radius=x; } double getArea(){ return pi()*radius*radius;} double getCircum(){ return 2*pi()*radius;} a) Class name is b) Member variable(s): variable(s).. c) Is there any constructor in the class Circle? Data type of member If Yes, write name of the constructor and its parameter.. d) Member method Return type Access Parameters with data Specifier type name

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here