Question: 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

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
Get step-by-step solutions from verified subject matter experts
