Hello once again fellow programmers I need help with a C# program. The program is supposed to include fields named radius, are and diameter. I got most of it up but it is not working saying there does not contain a static 'Main' method for suitable entry point.
using System;
using System.Collections.Generic;
using System.Text;
public class Circle
{
private double radius;
private double area;
private double diameter;
public Circle(double givenRadius)
{
radius = givenRadius;
}
public Circle()
{
radius = 10.0;
}
public double getRadius()
{
return radius;
}
public void setRadius(double givenRadius)
{
radius = givenRadius;
}
public double computeDiameter()
{
diameter = 2 * radius;
return diameter;
}
public double computeArea()
{
area = Math.PI * radius * radius;
return area;
}
}
public class TestCircle
{
public static void main(String[] args)
{
Circle defaultCircle = new Circle();
Console.WriteLine("Default Circle:");
Console.WriteLine("Diameter: " + defaultCircle.computeDiameter() + "Area: " + defaultCircle.computeArea());
Console.ReadLine();
}
}