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%