Q#1: Create a class named “Circle” having radius as attribute. There should be behavior to set the value of radius and to get the value of radius, diameter, circumference and area of the circle. Create another class named as Main which have two objects of Circle (c1, c2) having radius 3 and 4.5 respectively. Also display the radius, diameter, circumference and area of both circles.Note: Main class should not access the attributes of the Circle class.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here