1. Engineering
  2. Computer Science
  3. 914 write a program that does the ollowing use the...

Question: 914 write a program that does the ollowing use the...

Question details

9:14 Write a program that does the ollowing Use the peovided class, CircleCalculater as well as the classes Random, Mathan Namher Format to accomplish the felowing 1) Creane an object of the class CircleCalculator radiusA, arealA cincumferencelA arealB, circumference l B, ancaZ8 。2) Creant 10 variables oftype doble 3) Use Random class to generate vallues in the following ranges for radnA and RadiusB. adius a random double in the ranpe adius < S 4) For cach radius, calculate the arca and the ircumference of a circle by calling the available methods two times )For radis i) To calculate arealA and circumference! A. Bea v lac of3.142 for Pi, ii) To calculate area2A and circumference2A the valar of Pi based on the buil in Math contant value of Pi *b) For radius i) To calculate arcalB and circumferencelB, use a value o 3.142 for Pi ii) To calculate arca2B and circumference2B, use the value of P based on the buil in Math ooestant value of Pi ) Output the four sets of data using the following specification for how to format the values e a) Value of Radius you calculate Sormaodto Decimal places * b) Pi fomat so 10 Decimal places if the digit cxasts e c) Arca formated to 4 Decimal places places 6) Example Output. Do not make your uutthe same as mine but use text to indicate what all the ouputs are RadiusA of 1.2270 Valae of 3.142 for P Area A-4.7306 Circumference A-7 7106 Valae of 3.14159265359 for P Area A-4.7300 Circumference A-7.7096 RadiusB od 3.3642 Value of 3.142 for P Arca B-35.5601

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution