The problem is the get are functions are not returning the correct are. Not sure what the problem is. Also if anyone knows what the x,y coordinate might have to do with the area let me know.
#include <iostream>
#include "Circle.h"
#include "Rectangle.h"
usingnamespace std;
int main() {
double x, y, length, width;
double rad;
// Demonstrate a Circle.
cout << "Please enter the x coordinate of the circle's center: ";
cin >> x;
cout << "Please enter the y coordinate of the circle's center: ";
cin >> y;
cout << "Please enter the radius of the circle: ";
cin >> rad;
Circle c(x,y,rad);
cout << "The area of the circle is " << c.getArea() << ".";
// Demonstrate a Rectangle.
cout << "\n\nPlease enter the length of the rectangle: ";
cin >> length;
cout << "Please enter the width of the rectangle: ";
cin >> width;
Rectangle r(width, length);
cout << "The area of the rectangle is " << r.getArea() << ".\n";
return 0;
}