Description
1.Write a complete Java program called PatternMaker according to the followingguidelines.The program prompts the user for Fve input values:1.an integer value between 1 and 10 (inclusive) for the number of rows to beprinted2.a second integer value between 1 and 10 (inclusive) for the number of columnsto be printed3.a string value for the starting string of the pattern4.a string value for the second string of the pattern5.a string value that separates the Frst two stringsThe program must use nested for loops to print a rectangular array of alternating Frstand second strings of the pattern, separated by the separator string and such that theFrst string in the Frst row uses the “Frst string” provided by the user, but eachsubsequent row alternates the starting string between the “second string” the userprovided and the “Frst string” the user provided.So, for instance, if the user enters 5 for the number of rows, 7 for the number ofcolumns, and “XX” for the Frst string, “OO” for the second string, and “***” for theseparator, your program should print the following rectangular pattern.XX***OO***XX***OO***XX***OO***XXOO***XX***OO***XX***OO***XX***OOXX***OO***XX***OO***XX***OO***XXOO***XX***OO***XX***OO***XX***OOXX***OO***XX***OO***XX***OO***XXThoughtsNote the requirement for this program to use nested for loops (Horstmannsection 4.3).Note that there is no delimiter at the end of the lines.The logic needed for the nested for loops is a bit tricky. Try writing out the logicfor simple cases (e.g., 2 rows and 3 columns).