Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9.24 Lab5Num2 input is from a file called num1 in input consists of 4 doubles representing the radii of 4 circles. You are to make

image text in transcribed
image text in transcribed
9.24 Lab5Num2 input is from a file called num1 in input consists of 4 doubles representing the radii of 4 circles. You are to make an array of circles and then print out the radius followed by the circumference, one per line. So the output looks like this: 3.5 21.991148575128552 0.8 5.026548245743669 2.15 13.50884841043611 0.7 4.39822971502571 27148127676 LAD ACTIVITY 9.24. 1: Lab SNum2 0/5 Current file: Lab5Num2.java Load default template public class Labu2 I public static void main(String[] args) { //declare input file. Do this exactly as you did in netbeans. Try/catch. Don't forget imports 7/create (declare) an array that can hold circle objects Winput 4 circle objects into the array 7/DO THE REST AFTER YOU HAVE CREATED THE ARRAY [/output the radius and circumference of each member of the array starting with the LAST ONE Input is from a file called num1.in Input consists of 4 doubles representing the radii of 4 circles You are to make an array of circles and then print out the radius followed by the circumference, one per line. So the output looks like this 3.5 21.991148575128552 0.8 5.026548245743669 2.15 13.50884841043611 0.7 4.39822971502571 297148 1467870 LAB ACTIVITY 9.24 1. Lab5Num2 0/5 File is marked as read only Current file Circle.java 1 public class Circle //attribute private double radius; //constructors public Circle) (radius.e.e; 11 12 25 16 17 public Circle(double ) (radiusers ) //accessors public double getradius() { return radius; 2 //mutators public void setradius(double ) [ radius 21 23 24 1 / methods public double circunference) { return 2 Math.PI radius 26 27 25 public double area() { return Math.PI radius radius 1

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

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago