3.
4. class Checkstringsymmetry {
public static void main(String[] args) {
6.System.out.print("Please enter the character string you want to check:");
7.Scanner in-new Scanner(System.in);
8.
9.
String inputString in.nextLine();
int length inputString.length();
10.Stack stack= new Stack();
11.for (int i=0; i < inputString.length()1; i++) {
12.stack.push(inputString.charAt(i));
13.}
14.
15.
String reverseString = "";
16.while (Istack.isEmpty()) {
17.
reverseString = stack.pop();
18.}
19.
if (inputString.equals(reverseString))
20.System.out.println("This is a symmetric character string.")
21.else
22.
System.out.println("This is not a symmetric character string.");
23.}
24. }
Question 2 (3 points): Assuming you are assigned to conduct the component test for the method below, please design and create the minimum component test cases (Unit Test case) needed to achieve 100% statement covergage and 100% decision coverage. (Use question 2 template)
Zoom
+ 100%
Close