Write correct, successfully-compiling, correctly-running programs to accomplish the items that follow. Here are some pointers to keep in mind for those items:

In your program, you should:

  1. 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-axis
    b = vertical semi-axis
    Θ = the angle from the positive X-axis, in radians
    r(Θ) = the radius of the ellipse at angle Θ



    NOTE: sin2Θ and cos2Θ are equivalent to (sin Θ)2 and (cosΘ)2, respectively.

    Use 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.
    				
  2. 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 years
    P = initial investment
    r = interest rate, as a decimal (e.g. for a rate of 7.9%, r = 0.079)
    n = number of interest compounding periods per year
    A(t) = the compounded amount of your investment at time t


    Use 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.
    				
  3. 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 equation
    Here, A = the target compounded amount of your investmentt


    Use 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
    				

Program output, when the program is run, will probably look something like this:

(Do not worry about an odd number of decimal places in output. What matters is that the answer is mathematically correct as a result of proper construction of arithmetic expressions.)
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.0
		
In at least 150 words, please address the following questions:
  1. How did the process of creating these programs go for you?
  2. What were your main challenges and how did you overcome them?
  3. What did you learn that may be of use as you move along in this class?