Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

program in java In the following picture, you can see the diagram of class circle. Design class Circle with the following information: Class circle contains:

program in javaimage text in transcribed

In the following picture, you can see the diagram of class circle. Design class Circle with the following information: Class circle contains: three instance variable radius: it is a private instance variable of the type double, with default value of 1.0 color it is a private instance variable of the type String, with default value of "green". label: it is a public instance variable of the type String, with default value of "group1". three overloaded constructors - a default constructor with no argument, and a constructor which takes a double argument for radius, and a constructor which takes a double argument for radius, a string argument for color, and a string argument for label. Five public methods; getRadius(), getArea(), getCircumference(), getLabel(), and setLabel(:string). Design a class TestCircle, and let users to create 3 instance of class Circle by asking the following questions from the user. What is the label of your circle? What is the color of your circle? What is the radius of your circle? Now, for each circle, print the following information in a file named label txt (label is the label of the circle) For example: Inside file circle01.txt we have

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions