Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

This code is in Java. Thank you. image text in transcribed
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

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Current Trends In Database Technology Edbt 2004 Workshops Edbt 2004 Workshops Phd Datax Pim P2panddb And Clustweb Heraklion Crete Greece March 2004 Revised Selected Papers Lncs 3268

Authors: Wolfgang Lindner ,Marco Mesiti ,Can Turker ,Yannis Tzitzikas ,Athena Vakali

2005th Edition

3540233059, 978-3540233053

More Books

Students also viewed these Databases questions

Question

Solve problem and graph. -1 2/3t + 5 11

Answered: 1 week ago

Question

I am paid fairly for the work I do.

Answered: 1 week ago