Reference no: EM13713029
Question- The subsequent formula gives the distance between two points (x1, y1) and (x2, y2) in the Cartesian plane:
(x2-x1)^2 + (y2-y1)^2
Given the center and a point on a circle, you can use this formula to find the radius of a circle. Write a program that prompts the user to enter the center and a point on the circle.
Program- The program should then output the circle's radius, circumference, diameter, and area. Your program must have at least the given methods:
Part 1- distance: This method takes as its parameters four numbers that represent two points in the plane and returns the distance between them.
Part 2- Radius: This method takes as its parameter four numbers that represent the center and a point on the circle, calls the method distance to find the radius of the circle, and returns the circle's radius.
Part 3- Circumference: This method takes as its parameter a number that represents the radius of the circle and returns the circle's circumference. (if r is the radius, the circumference is 2(Pi)r.)
Part 4- Area: This method takes as its parameter a number that represents the radius of the circle and returns the circle's area. (If r is the radius, the area is (Pi)r^2.)
Assume that Pi =3.1416
Can you show me how to write a proper code for this problem and how to complete it. Thanks
Find the heat absorbed by the gas
: A cylinder contains 23 moles of an ideal gas at a temperature of 300 K. The gas is compressed at constant pressure until the final volume equals 0.43 times the initial volume.
|
Describe why a brute-force attack does not work
: Explain exactly why an exhaustive key search will not succeed even though sufficient computational resources are available. This is a paradox since we know that the OTP is unconditionally secure.
|
Program that counts the number of occurrences of lowercase
: Write a program that counts the number of occurrences of lowercase and uppercase vowels in entered lines of text. Use a two-dimensional array to store the vowel counts.
|
Find the change in the internal energy of the gas
: monatomic ideal gas undergoes an isothermal expansion at 300 K, as the volume increased from 0.03 m3 to 0.21 m3 the final pressure of the gas is 60 kPa.
|
Find the radius of the circle
: The program should then output the circle's radius, circumference, diameter, and area. Your program must have at least the given methods - Find the radius of the circle, and returns the circle's radius.
|
What kelvin temperature does the rms speed
: At what Kelvin temperature does the rms speed of the oxygen (O2) molecules in the air near the surface of the earth become equal to the escape speed from the earth.
|
Write a switch statement that assigns a string variable
: Write a switch statement that assigns a String variable monthName with the months January, February, March, April, May, and June, ifmonthNum is 1, 2, 3, 4, 5, 6, accordingly.
|
Implementing the tic tac toe game
: Write a graphical Java program implementing the Tic Tac Toe game - The program should play against a user. The user + program should start the game on alternate games.
|
Find volume charge density p
: In a certain region of space, the electric field E? Is uniform. Use Gauss's law to find volume charge density p in this region.
|