Write program which prints the following four triangle patterns with four different user
defined methods. Test your program by calling each of these four methods from the main method. Use different parameter values to test your methods. Assume the parameter of each method is an integer >= 5 and <= 25.
NOTE: Each of your methods is required to use two nested while loops to print its triangle pattern. Write your user defined methods in the same class as your main method and before your main method.
firstPattern(5); (call to firstPattern with parameter 5 produces this right triangle
with height 5 and base)
*
**
***
****
*****
secondPattern(5);
*****
****
***
**
*
thirdPattern(5);
*
**
***
****
*****
fourthPattern(5);
*****
****
***
**
*