Hello, I need ASAP help with a java coding question because I don't know how to do it. Will really appreciate someone's

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Hello, I need ASAP help with a java coding question because I don't know how to do it. Will really appreciate someone's

Post by answerhappygod »

Hello,
I need ASAP help with a java coding question because I don't
know how to do it. Will really appreciate someone's quick response.
Will attach the problem here.
Thank you.
Hello I Need Asap Help With A Java Coding Question Because I Don T Know How To Do It Will Really Appreciate Someone S 1
Hello I Need Asap Help With A Java Coding Question Because I Don T Know How To Do It Will Really Appreciate Someone S 1 (76.71 KiB) Viewed 24 times
Hello I Need Asap Help With A Java Coding Question Because I Don T Know How To Do It Will Really Appreciate Someone S 2
Hello I Need Asap Help With A Java Coding Question Because I Don T Know How To Do It Will Really Appreciate Someone S 2 (21.81 KiB) Viewed 24 times
1. Fibonacci & Mandelbrot PROBLEM STATEMENT: Given the function f(z)=z2+0,"iterate" the function by evaluating f(f(fl... F(FCO))))), stopping as soon as the function escapes or cycles. The function escapes when the absolute value is greater than a specified value; in this problem it is 4. The function cycles when it results in a value that it has already produced after rounding each result to 2 decimal places. The variable z and the constant Care complex numbers. In order to use complex numbers, we need to define an imaginary number, is such that i = v=1 and therefore, the value of P = VAI VAI= A complex number has two parts: a real part and an imaginary part. They are represented in the form a+bi, where a is referred to as the real number part and bi as the imaginary number part. Both a and bare real numbers. There are three operations you will need to perform on complex numbers: addition, multiplication, and absolute value. Here is how each operation is performed: Addition. Combine the real parts and combine the imaginary parts: (a+b7) + (c+di) = (a+c)+(b+d); Example: (5+21) +(3-61) = (8-4). • Multiplication. Use the distributive property on binomial terms: (a+b)(c +d) = ac+adi+bci+bd? = (ac-bd) + (ad+bc) i Example: (5+1)(3+21)=5*3 + 5*21 + 1*3i+ 1*2? =15 + 101+31-2 = 13 + 131 Example: (5+27(3-6) = 27-241 Absolute Value. The absolute value of a complex number is given by the formula: |a + bil = a +32 13 – 41 = 132 + (-4)? = 79+ 16 = V25 = 5 Example: In this program, round the result of each iteration to the nearest hundredth (both the real part and the imaginary part). When the function result matches a previous value, output the length of the cycle. (i.e.. the number of unique values from the first of the matching values to the second one). If the absolute value is greater than 4, output "ESCAPES n", where n is the number of the last iteration that was completed. There is a single space between the word ESCAPES and the number n. When rounding, find the closest value to the calculated result with only 2 decimal places and if there's a 5 in the third decimal place, round away from 0. This is the default for the round function in Java, C++, and Python. We guarantee that there will be no more than 500 iterations before the function either cycles or escapes. EXAMPLES C=-0.1 +0.75i f(0) = (0)2+(-0.1 +0.757 =-0.1 +0.75i f(-0.1 +0.757) = (-0.1 +0.7572 + (-0.1 +0.757) = -0.65 +0.61 f(-0.65 +0.61) = (-0.65 +0.612 + (-0.1 +0.751) = -0.04 -0.031 F(-0.04 -0.03.7) = (-0.04 -0.037)2 + (-0.1 +0.750) = -0.1 +0.75i Since none of these absolute values is greater than 4 and this last result is the same as the first result, this is a cycle of 3 values. The output is "3". C = 2-0.31 f(0) = (0)2 + (2 -0.31 = 2 - 0.31 f(2 -0.37) = (2-0.31)2 + (2 -0.37 = (4 -0.61 -0.61 +0.092) + (2-0.31) = (4 -0.09 + 2) + (-0.6 -0.6 -0.3)/ = 5.91 - 1.54

The absolute value of 5.91 - 1.51= 5.912 + (-1.5) 34.9281 +2.25 = 6.09738. This value is larger than 4 so an input value of 2-0.3i would output "ESCAPES 2". TASK Complete the function cycleLength in the editor below. The function has two parameters: both real numbers representing the real part, a, and the imaginary part, b, of the complex number, Cin the function fiz) =2+ C The function should return a string representing either the length of the cycle or the string "ESCAPES n" if the function escapes. . You may create additional functions that are called from cycleLength if needed in solving the problem. CONSTRAINTS We guarantee that there will be no more than 500 iterations of the function. The output must match the format specified exactly.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply