## Linda1 -6

I was doing well in this project until I was trying to do the math problem on the third class.
The project is, we are supposed to create a base class of circle and create 2 derived classes
The first is sector derived from circle then the segment is derived from sector. It ran ok until the math in the sector was outputing junk. Can you show me why the values from circle and segment is not getting transferred despite calling it? NEED THE CODE ...
here it is!

``````#ifndef H_SECTOR
#define H_SECTOR
#include <iostream>
#include<cmath>
const double PI = 3.14;
using namespace std;
class Circle
{
public:
double Area;
Circle(); //default constructor
double calculateArea(); //calculates the area of circle
void show(); //display value
protected:
};
class Sector
{
protected:
double Angle;

public:
double getAngle();
double calculateSector();
void show();

};
#endif

#include<iostream>
#include "Circle.h"

#include <cmath>

int main()
{
double Angle, Sector;
Circle evaluateCircle;
Area = evaluateCircle.calculateArea();
evaluateCircle.show();

Sector evaluateSector;
Angle = evaluateSector.getAngle();
Sector = evaluateSector.calculateSector();
evaluateSector.show();

return 0;
}
Circle::Circle()
}
{
}
double Circle::calculateArea()
{
Area = PI * pow(Radius, 2);
return Area;
}
void Circle::show()
{
cout << "The area of the circle is  " << Area << endl;
}
Sector::Sector()
{
double Angle = 0;
}
double Sector::getAngle()
{
cout <<  "Enter the angle in radians  ";
cin >> Angle;
return Angle;
}
double Sector::calculateSector()
{
Sector = (pow(Radius,2)* PI * Angle)/ 360;
return Sector;
}
void Sector::show()
{
cout << "The sector is  " << Sector << endl;
}
``````

## Alex Edwards 321

I was doing well in this project until I was trying to do the math problem on the third class.
The project is, we are supposed to create a base class of circle and create 2 derived classes
The first is sector derived from circle then the segment is derived from sector. It ran ok until the math in the sector was outputing junk. Can you show me why the values from circle and segment is not getting transferred despite calling it? NEED THE CODE ...
here it is!

First of call, use code tags please...

code=c++

/code