This code is in Java. Thank you.
Project 2 CS 121 Computer Science I This is an open book assignment and you are welcome to ask for assistance from the instractor, bu, unlike the labs, you may mot discuss the project with your classmates or any other person, and no student should ever copy another student's code or code from the internet. Remember to comment your code as necessary and be sure that your submitted code compiles. Follow the sulmission guidelines Ibelow Please submit your work to Canvas by 11:59 pm on November 11, 2018. a org /wik curve or httwww.voutube.com is a space filling curve that gives a fractal image whose boudary has Hiukdorff dilintasion 1.52. TO generate as dragon curve, compute the sequencewhere awa if k=0 mod 2 if k mod 4 0 if k3 mod4 01 The first 20 terms in are (a) are 1.1.001,.1,0,0,1.0,01,1,0.1. Then, start at the origin and take one step to the right as shown in red in the following figure. That is the zeroth step. For the kth step. k l. turn left and take one step if ak-l and turn right and take a step if -0. Coutinue until yu have taen n steps. In the following grap,20 Suart -32 (1) Write a Java program that prompts the user for the number of steps n and the size of the viewing windon (2) Compute the sequence faI (3) Graph the dragon curve: (a) Use StarasetXscale( ) and StdDrag, setYcale() to set the viewing window tol-u, w (b) Use StdDrau.clear) to set the background color to something other than white. (c) Use StdDrav.setPenColor) to set the color of the curve to something other than black. (d) Use StdDraw.setPenRadius to set the pen radius to 0.003. (e) Use StdDrau.1ine to draw the dragon curve with steps. I-u, u See the sample output beow. Submit your completed and properly documented -java file to Canvas Please continue to use the same code format including the beader indicating the elass (CS 121), the author (you), your email address, the date, and a brief description of the program. Project 2 CS 121 Computer Science I This is an open book assignment and you are welcome to ask for assistance from the instractor, bu, unlike the labs, you may mot discuss the project with your classmates or any other person, and no student should ever copy another student's code or code from the internet. Remember to comment your code as necessary and be sure that your submitted code compiles. Follow the sulmission guidelines Ibelow Please submit your work to Canvas by 11:59 pm on November 11, 2018. a org /wik curve or httwww.voutube.com is a space filling curve that gives a fractal image whose boudary has Hiukdorff dilintasion 1.52. TO generate as dragon curve, compute the sequencewhere awa if k=0 mod 2 if k mod 4 0 if k3 mod4 01 The first 20 terms in are (a) are 1.1.001,.1,0,0,1.0,01,1,0.1. Then, start at the origin and take one step to the right as shown in red in the following figure. That is the zeroth step. For the kth step. k l. turn left and take one step if ak-l and turn right and take a step if -0. Coutinue until yu have taen n steps. In the following grap,20 Suart -32 (1) Write a Java program that prompts the user for the number of steps n and the size of the viewing windon (2) Compute the sequence faI (3) Graph the dragon curve: (a) Use StarasetXscale( ) and StdDrag, setYcale() to set the viewing window tol-u, w (b) Use StdDrau.clear) to set the background color to something other than white. (c) Use StdDrav.setPenColor) to set the color of the curve to something other than black. (d) Use StdDraw.setPenRadius to set the pen radius to 0.003. (e) Use StdDrau.1ine to draw the dragon curve with steps. I-u, u See the sample output beow. Submit your completed and properly documented -java file to Canvas Please continue to use the same code format including the beader indicating the elass (CS 121), the author (you), your email address, the date, and a brief description of the program