Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ih i need help with problem using circle class as per the UML diagram this what is geve 2 7 2 Problem: Circle Class Write
ih i need help with problem using circle class as per the UML diagram this what is geve
2 7 2 Problem: Circle Class Write a Circle class as per the UML diagram shown below: Circle radius: double PI_VALUE: double +Circle( double rad) + Circle() + Circle(String rad) + setRadius : (double rad) : void + setRadius : (String rad) : void + getRadius: double + getArea : double + getCircumference : double More details on some methods: Pl: a final double initialized with the value 3.14159 area: Returns the area of the circle, which is calculated as area = PI radius*radius circumference: Returns the circumference of the circle, which is calculated as circumference = 2*PI radius Use CircleDemo.java provided along with assignment to check your class Circle. Expected Output: + getCircumference: double More details on some methods: . Pl: a final double initialized with the value 3.14159 area: Returns the area of the circle, which is calculated as area PI*radius*radius circumference: Returns the circumference of the circle, which is calculated as circumference - 2 PI radius Use Circle Demo.java provided along with assignment to check your class Circle. Expected Output: Please enter the radius of circle1:5 Area of circle is 78.54 Circumference of circle is: 31.42 Please enter the radius of circle2:6 Area of circle is 113.10 Circumference of circle is: 37.70 estv
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started