Find the Errors
Each of the following declarations, programs, and program segments has errors. Locate as many as you can.
A) class Circle:
{
private
double centerX;
double centerY;
double radius;
public
setCenter(double, double);
setRadius(double);
}
B) #include <iostream>
using namespace std;
Class Moon;
{
Private;
double earthWeight;
double moonWeight;
Public;
moonWeight(double ew);// Constructor
{ earthWeight = ew; moonWeight = earthWeight / 6; }
double getMoonWeight();
{ return moonWeight; }
}
int main()
{
double earth;
cout >> "What is your weight? ";
cin << earth;
Moon lunar(earth);
cout << "On the moon you would weigh "
<<lunar.getMoonWeight() << endl;
return 0;
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.