Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace assignment_2_question_4_main_method
- {
- public class Circle
- {
- private double radius;
- private const double PI = 3.14159;
- // Constructor (no argument)
- public Circle()
- {
- // insert code here
- radius = 0.0;
- }
- // Constructor
- public Circle(double rad)
- {
- // insert code here
- radius = rad;
- }
- // SetRadius
- public void SetRadius(double rad)
- {
- // insert code here
- radius = rad;
- }
- // GetRadius
- public double GetRadius()
- {
- // insert code here
- return radius;
- }
- // GetArea
- public double GetArea()
- {
- // insert code here
- return PI * (radius * radius);
- }
- // GetCircumference
- public double GetCircumference()
- {
- // insert code here
- return 2 * PI * radius;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement