Java Zelda Triangle Problem
Problem to make a Zelda triangle by using Java.
I have the code for a normal triangle in dpaste.com/83617
Zelda triangle contains three such triangles.
My approach to the problem:
A. the row of 1st triangle
1. The indent for the 1st triangle can be by a simple for loop
2. Then I would add the triangleSmall method to code
B. the row of 2nd triangle
1. Add the triangleSmall method
2. Add a new for loop which makes the inner, upside-down triangle
3. Add the triangleSmall method
Problem in joining the triangleSmall method:
The parameters set in the main method do not work in the method triangleSmall. This problem is perhaps caused by the fact that the parameters set in the main method do not apply to the method triangleSmall. I have considered that the adding of method in Java works like the include command in php: this is not true in Java.
How would you make a Zelda triangle by using Java? Should I make just one method which contains all code?