1. Define a class RecurringPatterns and define methods in it which will
print the following patterns.
a) The method takes an integer argument n and prints
the following pattern, shown for n=4.
a
a a
a a a
a a a a
a a a
a a
a
b) The method takes an integer argument and prints
the following pattern, shown for n=4.
1
121
12321
1234321
12321
121
1
c) The method takes an integer argument and prints
the following pattern, shown for n=4.
abcdcba
abc cba
ab ba
a
a
ab ba
abc cba
abcdcba
Note: for the three methods above you can assume that n<10. However, think about what you would do if you allowed n to be a 2 or even 3 digit integer.