439,975 views
23 votes
23 votes
Complete the constructors and the sectorArea method of the Circle class.

public class Circle
{
private double radius;

// constructors
// postcondition: the instance variable is initialized
public Circle(double rad)
{

}

// postcondition: the instance variable is initialized
public Circle(int diameter)
{

}

// postcondition: returns the sector area of a circle with radius equal to
// this circle's radius, according to the formula: (deg / 360) * PI * r^2,
// where deg is the angle in degrees passed as the parameter,
// PI is the value of pi (3.1415...), r is the radius of the circle,
// and "^2" means raised to the second power.
// Use the Math class constant to represent the value of pi.
public double sectorArea(double degree)
{

}

// There may be other instance variables, constructors,
// and methods that are not shown.

}

User Shoother
by
2.5k points

1 Answer

20 votes
20 votes

Answer:

the diameter

Step-by-step explanation:

is * piI * r^28x 45

User FloSchmo
by
2.5k points