Write correct, successfully-compiling, correctly-running programs to accomplish the items that follow. Here are some pointers to keep in mind for those items:
System.out.println(Math.sin(0)); // prints 0.0 System.out.println(Math.sin(Math.PI / 2)); // prints 1.0
System.out.println(Math.cos(0)); // prints 1.0 System.out.println(Math.cos(Math.PI / 2)); // prints 0.0
System.out.println(Math.pow(3, 2)); // prints 9.0 System.out.println(Math.pow(2.0, 4)); // prints 16.0 System.out.println(Math.pow(4, 3.0)); // prints 64.0 System.out.println(Math.pow(3.0, 3.0)); // prints 27.0
System.out.println(Math.log(1)); // prints 0.0 System.out.println(Math.log(Math.E)); // prints 0.0
Ellipse.java: You have probably seen an ellipse before. (A formal mathematical definition of an ellipse would be beyond the scope of this assignment, but if interested, you may read more at sources such as this one.) It is similar to a circle, only "flattened", such as the ellipse shown below:
As you can see, it has two axes -- one horizontal and one vertical. In this case, the horizontal axis is the longer of the two. Its center is at the origin of the coordinate plane.
In this part of the assignment, we start with the ellipse depicted above -- centered at the origin, whose horizontal and vertical axes are 20 and 6 units long, respectively. We could, instead, say that it has horizontal and vertical semi-axes 10 and 3 units long, respectively. Furthermore, we could also say that each point along the ellipse's edge represents an angle Θ, with respect to the positive X-axis. For example, the point [10, 0] would correspond to a zero-degree angle (Θ = 0) from the positive X-axis, the point [0, 3] would correspond to Θ = 90 degrees (or π/2 radians), the point [-10, 0] would correspond to Θ = 180 degrees (or π radians), and so forth. A line -- from the ellipse's center to its edge, drawn at angle Θ -- would represent the radius of the ellipse at Θ
Write code to compute the radius of our ellipse at Θ = 2.9 radians (not degrees!). You will need double variables to represent the angle Θ, the horizontal semi-axis A, the vertical semi-axis B, and the radius. With those variables, you will write expressions and statements to calculate the radius at Θ:
a = horizontal semi-axisUse println statements to announce the values of the sides and resulting triangle area (in place of the blank), skipping a line afterward. Use string concatenation with the variables.
The horizontal axis A is 10.0 units. The vertical axis B is 3.0 units. The angle THETA is 2.9 radians. The radius (at 2.9 radians) is ________ units.
CompoundAmount.java: Write code to compute the compound amount, after a period of time, for a monetary investment that earns interest. Your initial investment is $8000.00.With an interest rate of 6.5% per year and 4 compounding periods per year, how much will yoru investment be after 7 years? You will need variables for the initial investment, interest rate, number of compounding periods in a year, and the time frame.
t = time, in yearsUse println statements to announce the values of the initial investment, the interest rate, the number of compounding periods in a year, the time, and the compound amount (in place of the blank), skipping a line afterward. Use string concatenation with the variables.
The initial investment is 8000.0 dollars. The interest rate is 6.5 percent per year. There are 4.0 compounding periods in a year. The time frame is 7.0 years. After that time, you will have _______ dollars.
DoublingTime.java: Given your initial investment of $8000.00, 6.5% interest rate, and 7-year time frame -- but with daily compounding (i.e., 365 compounding periods per year) -- how long will it take for your investment to double in size?. For this one, you can actually reuse some of your previously declared variables, instead of declaring new ones.
Most variables are the same as in the previous equationUse println statements to announce the result. Use string concatenation with the variables.
At an interest rate of 6.5 percent per year, it would take _______ years for the original $8000.0 to grow to $16000.0
The horizontal axis A is 10.0 units. The vertical axis B is 3.0 units. The angle THETA is 2.9 radians. The radius at THETA = 2.9 radians is _______ units. The initial investment is 8000.0 dollars. The interest rate is 6.5 percent per year. There are 4.0 compounding periods in a year. The time frame is 7.0 years. After that time, you will have _______ dollars. At an interest rate of 6.5 percent per year, it would take _______ years for the original $8000.0 to grow to $16000.0In at least 150 words, please address the following questions: