Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is the circle.java class *file ITEC 2150 - Week 2 Weekly Assignment, Chapter 1 and 2140 Review - Spring, 2021 Due Date: Monday, February

image text in transcribed
image text in transcribed this is the circle.java class
*file
ITEC 2150 - Week 2 Weekly Assignment, Chapter 1 and 2140 Review - Spring, 2021 Due Date: Monday, February 1, 2021 by 11:59 PM Goals of this assignment: 1. Demonstrate understanding of creating objects from a class type 2. Demonstrate understanding of using console input and output (Scanner and System.out) 3. Demonstrate understanding of arrays of objects I Problem: You are given the class Circle.java. Download into your IDE of choice. Create a second Java class titled GircleArray with a main method. In the main method, create an array or Arraylist to hold three (3) Gircle objects. Using an appropriate loop (hint: for loop), create each Circle object and ask the user for a radius for each new Circle object. Set the radius and store the new Circle object in the array or ArrayList. After the loop completes, code a second loop to computer area and print radius and area for each Circle in the array, Do NOT edit Circle.java and turn in new CircleArray java file. Circle (3) - Notepad File Edit Format View Help public class Circle private double radius; public circle() ) - Don public circle(double radius) Home this.radius = radius; } 7** Return radius */ public double getRadius() { return radius; } I I /** Set a new radius */ public void setRadius (double radius) this.radius = radius; 3 k access sktop wnloads cuments tures lio usic public double getArea() { return radius radius. Math.PI; / Return diameter / public double getDiameter() return 2 radius; 3 deos public double getPerimeter Drive return 2 radius Math.PI; 3 PC Print the circle info public void printcircle System.out.println("The circle radius is + radius); Objects Esktop ocuments 3

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

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

More Books

Students also viewed these Databases questions

Question

1. Are my sources credible?

Answered: 1 week ago

Question

4. Who should be invited to attend?

Answered: 1 week ago

Question

7. How will you encourage her to report back on the findings?

Answered: 1 week ago