Computers and Technology, 03.12.2020 05:50 imran2k13
In Java pls help ASAP
In this program we are going to practice using the Math class by computing some important values on the unit circle. Using the angles 0, PI/2, and PI, print out the angle, the cosine of the angle, and the sine of the angle.
Your output should look like this:
Radians: (cos, sin)
0.0: 1.0, 0.0
1.5707963267948966: 0.0, 1.0
3.141592653589793: -1.0, 0.0
Hints:
You’ll need to use the Math. sin, Math. cos methods
and the Math. PI constant!
You can round a decimal to 2 decimal places by multiplying by 100, rounding to the nearest int using Math. round, and then dividing by 100. You will need to round the sine and cosine values. Here’s an example:
double angle = Math. PI/4;
double cosine = Math. cos(angle); // 0.707106781
cosine = cosine * 100; // 70.7106781
cosine = Math. round(cosine); // 71.0
cosine = cosine / 100.0; // 0.71
// Or put it all on one line:
cosine = Math. round(cosine * 100) / 100.0;
Some Math Background
The Java methods need the angles to be in radians, rather than degrees. PI/2 radians is equal to 90 degrees. PI radians is equal to 180 degrees.
That’s why we’re using multiples of PI in this exercise.
Answers: 3
Computers and Technology, 22.06.2019 10:30
You are almost finished updating a web site. as part of the update, you have converted all pages from html 4.0 to html5. the project is currently on schedule. however, your project manager has been asked by the marketing team manager to justify a day of time spent validating the site's html5 pages. the marketing team manager does not have technical knowledge of the internet or the web. which is the most appropriate explanation to provide to the marketing team manager?
Answers: 1
Computers and Technology, 22.06.2019 19:00
Stacy works as blank. the most important soft skill she needs for this role is blank.
Answers: 3
Computers and Technology, 23.06.2019 11:00
What are the possible consequences of computer hacking? what is computer piracy? describe some examples. what are the effects of computer piracy? what are the possible consequences of computer piracy? what is intentional virus setting? describe some examples. what are the effects of intentional virus setting? what are the possible consequences of intentional virus setting? what is invasion of privacy? describe some examples. what are the effects of invasion of privacy? what are the possible consequences of invasion of privacy? what is an acceptable use policy and what is the purpose of the acceptable use policy what is intellectual property and how can you use it?
Answers: 1
Computers and Technology, 24.06.2019 18:30
What are the benefits to using presentations to organize and deliver information in the workplace? they add visual appeal. they are easy to update. they ensure accuracy. they can be created quickly. the work can't be lost.
Answers: 1
In Java pls help ASAP
In this program we are going to practice using the Math class by computing so...
Mathematics, 18.12.2020 22:30
Mathematics, 18.12.2020 22:30
Advanced Placement (AP), 18.12.2020 22:30
Mathematics, 18.12.2020 22:30
Chemistry, 18.12.2020 22:30
Social Studies, 18.12.2020 22:30
Mathematics, 18.12.2020 22:30
Mathematics, 18.12.2020 22:30
Mathematics, 18.12.2020 22:30
Mathematics, 18.12.2020 22:30