Write a program that uses recursion to draw an image. Your program may be a modi

Write a program that uses recursion to draw an image. Your program may be a modification of the fern program shown in class, but it must: 1) produce an image that is visually distinct from the ones presented in class, and 2) read numerical parameters from a text file, and use those parameters to determine features of the image. Ideally, a user would be able to explore a wide range of images that result from providing different parameter values.
( There are two different codes for these exercises that are meant to be used. Please choose one of the codes and  please add on to the code that follows the instructions above.)
( do not forget to Add the StdDraw code( which is attached)  to your src directory in your project folder, alongside your .java file.)
Write a recursive program Ruler to plot the subdivisions of a ruler using StdDraw, as in PROGRAM 1.2.1( the highlighted part)
Program 1.2.1 String concatenation
public class Ruler
{
public static void main(String[] args)
{
String ruler1 = “1”;
String ruler2 = ruler1 + ” 2 ” + ruler1;
String ruler3 = ruler2 + ” 3 ” + ruler2;
String ruler4 = ruler3 + ” 4 ” + ruler3;
System.out.println(ruler1);
System.out.println(ruler2);
System.out.println(ruler3);
System.out.println(ruler4);
} }
This program prints the relative lengths of the subdivisions on a ruler. The nth line of output is the relative lengths of the marks on a ruler subdivided in intervals of 1/2n of an inch. For example, the fourth line of output gives the relative lengths of the marks that indicate intervals of one-sixteenth of an inch on a ruler.

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount