Create a class namely Circle and do the following: (i) Circle will have the following member variables: Point - an inner class having two members variables x and y representing the center and radius (a floating-point number) (ii) Crcate a method in the inner class namely getPoint() to print the point (x, y) that represents the circle center. (iii) Write a main method to create 10 random circles with the grid of (10, 10) and (70, 70).

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter4: More Object Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
100%
Create a class namely circle and do the following:
(i) Circle will have the following member variables: Point - an inner class having two
members variables x and y representing the center and radius (a floating-point
number)
(ii) Crcate a method in the inner class namely getPoint() to print the point (x, y) that
represents the circle center.
(iii) Write a main method to create 10 random circles with the grid of (10, 10) and (70, 70).
Transcribed Image Text:Create a class namely circle and do the following: (i) Circle will have the following member variables: Point - an inner class having two members variables x and y representing the center and radius (a floating-point number) (ii) Crcate a method in the inner class namely getPoint() to print the point (x, y) that represents the circle center. (iii) Write a main method to create 10 random circles with the grid of (10, 10) and (70, 70).
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT