Q1_20250805080329.webp
Hữu Nghĩa

Q1_20250805080329.webp

☑Kizspy.me
28.
29.
30.
public static void main(String[] args) {
int[][] matrix {{1, 2, 3, 4) (5, 6, 7, 8} (9, 10, 11, 12}};
31.
32.
int[][] subMatrix -((6, 7) (10, 11)};
33.
34.
if (isSubMatrix(matrix, subMatrix)) {
35.
System.out.println("The submatrix does not exists in the larger matrix.");
36.
} else {
37.
System.out.println("The submatrix exist in the larger matrix.");
38.
39.
}
}
40. }
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)
public double calculate Insurance Fee (int age, String gender, int coverageAmount, double extraFee) {
double[][] baseRate = {
(50, 0.4, 0.35),
Zoom
1.
2.
3.
4.
(40, 0.3, 0.28),
5.
(30, 0.25, 0.23},
6.
(25, 0.22, 0.2),
7.
(18, 0.2, 0.18)
8.
};
9.
10.
double rate 0.0;
11.
for (double[] entry
baseRate) {
12.
if (age entry[0]) {
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
SWT301
Thêm bởi
Hữu Nghĩa
Ngày thêm
Lượt xem
11,991
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom