Answer:
The method and the test cases is as follows:
import java.util.*;
public class Main{
public static void printChars (char [tex]ch1[/tex], char [tex]ch2[/tex], int [tex]numPerLine[/tex]){
int count = 0;
for(char ch = ch1; ch<=ch2; ch++){
System.out.print(ch+" ");
count++;
if(count == numPerLine){
System.out.println();
count = 0; } }
System.out.println(); }
public static void main(String[] args) {
printChars('1','Z',10);
printChars('a','z',13);
printChars('A','Z',13);
}}
Explanation:
See attachment for complete source file where comments are used as explanation