Question: Problem 2: Random Points on a Circle Write a Java program that generates three random points on a circle centered at (0, 0) with a

 Problem 2: Random Points on a Circle Write a Java program

Problem 2: Random Points on a Circle Write a Java program that generates three random points on a circle centered at (0, 0) with a radius given as input from the user. Set the precision for the (x, y) coordinates to 2 decimal numbers. Hint: Generate a random angle a in radians between 0 and 2pi, as shown in Figure (b) and the point determined by this angle is (r*cos(a), r sin(a)) x = rx cos(a) and y : rxsin(a) (x. y) 6) Sample Input/Output Enter the radius: 40 Three random points are (-8.71, 39.04) (9.97, -38.74) (-29.76, 26.73)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!