subject

Write a java program that prompts the user for the diameter of a circle and an x-increment "dx" (both in centimeters), then calculates and displays the area of the circle in square centimeters using a Riemann Sum. To find the area of the circle using a Riemann sum, first, find the area of one quadrant by dividing the quadrant into rectangles, each of width "dx" (as in "delta-x", which means "change in x"), and then use the Pythagorean Theorem to find the "y" value at each "x" value.
y = sqrt(r^2 - x^2)
Multiply "dx" by "y" to get the area of the rectangle at that "x" value (see attached diagram). Add the areas of the rectangles together, and you have the area of the quadrant. To obtain the area of the entire circle, multiply the quadrant's area by four.

The program should use a for loop to do the calculations.
All variables should be of type double.
It should also use at least 2 methods.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 Β½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1Β½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
question
Computers and Technology, 23.06.2019 10:30
How would you categorize the software that runs on mobile devices? break down these apps into at least three basic categories and give an example of each.
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
You know the right answer?
Write a java program that prompts the user for the diameter of a circle and an x-increment "dx" (bot...
Questions
question
Mathematics, 12.04.2020 05:24
question
Mathematics, 12.04.2020 05:24
Questions on the website: 13722360