Академический Документы
Профессиональный Документы
Культура Документы
Instruction: This assignment consists of FOUR questions with total marks of 60. Answer 1-3
questions. You may either do this assignment individually, or in pair.
You are assigned with a task to test an online car loan calculator application. The screen
snapshot for car loan calculator is presented in Figure 1 together with the system input
requirements. Analyse the figure to answer the following questions:
i. List five (5) test requirements that needed to test the web application (5 m)
ii. Use the equivalence class partitioning technique to generate test cases that relate to
the test requirements identified in (i). (10 m)
Consider a module, called ElecBill which is part of Tenaga National Berhad (TNB) billing
application. The ElecBill module is to compute bill payment of electrical consumption for
different users. In order to promote saving, TNB charge a lower rate to users with lower
consumption as shown in Table 1.
Write test-cases for testing the functionality of this module by using equivalence
partitioning technique. Use data from boundary values analysis for each of your test case.
#include <iostream>
Using Namespace std;
double total,hours;
int main()
{
cout << "Charges for the first 3 hours = RM2.00" << endl;
cout << "Additional charges for the next hours = RM1.50" << endl;
cout << "Maximum charges for any 24 hours = RM20.00" << endl;
cout << "\nPlease insert your hours = ";
cin >> hours;
system(PAUSE);
return 0;
Suppose a buy-online-ticket application for a theme park is selling tickets at prices as shown
in Table 2. The application will ask theb uyer for his/her age, and it will then identify the
required price for the ticket.
Table 2
Ticket Type Price
1-Day Child Ticket RM 80
(Age: 3-11)
1-Day Adult Ticket RM 140
(Age:12-59)
1-Day Senior Ticket RM 110
(Age: 60-75)
a) List all valid and invalid equivalence classes based on Table 2 (there should be 5
equivalence classes identified) (5 marks)
b) Design test case using the equivalence class you have identified in (a) by filling in the
data in Table 3. (5 marks)
Table 3
Equivalence Class # Age Expected Output
1
2
3
4
5
A
B
C
G
E
H I
F
Figure 3