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....


Solve using OOP in Java.


Q#1: Create a class named “Circle

Extracted text: 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.

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here