SWT301_-_PE_-_SP_2025_3560.webp
Minthep

SWT301_-_PE_-_SP_2025_3560.webp

  • Media owner Minthep
  • Ngày thêm
Question 3 (2 points): Component Test Case Design
Below is a method for calculating reward point based on booking amount and customer type.
public int calculateReward Points(double bookingAmount, String customerType) {
if (bookingAmount < 0) {
return -1;
} else if (customerType.equals("VIP")) {
return (int) (bookingAmount * 0.1);
} else if (customerType.equals("Regular")) {
return (int) (bookingAmount * 0.05);
} else {
return 0;
Design Unit Test Cases to ensure:

100% Statement Coverage

100% Branch Coverage
⚫ 100% Equivalence Partitioning Coverage
⚫ 100% Boundary Value Coverage
Answer requirements:
⚫ List all required test cases (including input values and expected output).
⚫ Explain how the test cases ensure full coverage.
Question 4: System Test Case Design (2 points)
Write System Test Cases to test two key business processes in the travel booking system:
1. Booking a Travel Package
2. Searching for Available Hotels
+ 83%

Thông tin

Category
SWT301
Thêm bởi
Minthep
Ngày thêm
Lượt xem
5,711
Lượt bình luận
3
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom