5
int lowerCaseCount = 0;
6
int numericCount = 0;
7
int specialCharCount = 0;
8
9
10
11
12
13
14
15
16
} else {
17
for (char c input.toCharArray()) {
if (Character.isUpperCase(c)) {
upper CaseCount++;
} else if (Character.isLowerCase(c)) {
lower CaseCount++;
} else if (Character.isDigit(c)) {
numericCount++;
specialCharCount++;
18
}
19
}
20
21
22
character Counts.put("UpperCase", upper CaseCount);
23
24
character Counts.put("Numeric", numericCount);
25
HashMap<String, Integer> character Counts = new HashMap<>();
character Counts.put("LowerCase", lowerCaseCount);
character Counts.put("SpecialCharacter", specialCharCount);
26
27
return character Counts;
28
}
29
}
Question 3 (4 points): You are assigned to do the functional (black-box) test for function Create
Zoom
+ 100%
Close