Question: a3: (10pt) Define a class which has at least two methods getString: to get a string from console input printString: to print the string in
a3: (10pt) Define a class which has at least two methods getString: to get a string from console input printString: to print the string in upper case. Also please include simple test function to test the class methods. Answer: Q4: (10pt) Write a program which takes 2 digits, X,Y as input and generates a 2- dimensional array. The element value in the i-th row and j-th column of the array sh be i'j. Note: i-0,1., X-1;j-0,,Y-1. Example Suppose the following inputs are given to the program: 3,5 Then, the output of the program should be: Ilo, 0, 0, o, o], [0, 1, 2, 3, 4], [O, 2, 4, 6, 81 Answer: a3: (10pt) Define a class which has at least two methods getString: to get a string from console input printString: to print the string in upper case. Also please include simple test function to test the class methods. Answer: Q4: (10pt) Write a program which takes 2 digits, X,Y as input and generates a 2- dimensional array. The element value in the i-th row and j-th column of the array sh be i'j. Note: i-0,1., X-1;j-0,,Y-1. Example Suppose the following inputs are given to the program: 3,5 Then, the output of the program should be: Ilo, 0, 0, o, o], [0, 1, 2, 3, 4], [O, 2, 4, 6, 8
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
