Work only on ONE of these assignments, if you solve both only the second one will be scored, hence it is NOT possible to achieve the sum of scores (5 + 7) !
Write a program that reverses a string, e.g. string "Hello" => "olleH".
The string can be passed to the program by command line or interactively, whatever you like better.
The important part is: the program MUST be designed RECURSIVELY, hence no programs written ITERATIVELY (i.e. using a loop-construct) will be scored (although they might show the same result).
Hint:
You might need the following String-methods, defined in the class java.lang.String:
Score: 5 Points
Create a fractal tree as seen on my slides. The program MUST be designed recursively.
A fractal tree consists of 2 branches, forming a 'V'. On the tip of each branch there is a new 'V', having
a branch-length which is smaller (a fraction, e.g. 1.8) than the length of the parental 'V'.
Only program the basic fractal tree, don't copy the interactive part (sliders etc.) of the example program on my slides.
Hints:
Each V consists of 2 branches...
Your function will need the parameters:
Score: 7 points
Good Luck !