Professional Documents
Culture Documents
COMSATS UNIVERSITY
ISLAMABAD
SUBMITTED BY
SUBMITTED TO
Table of Contents
Test Cases.................................................................................................................3
Test Case# 01 (valid input)....................................................................................3
Test Case# 02 (valid input)....................................................................................3
Test Case# 03 (Invalid input).................................................................................4
Test Case# 04 (Valid input)...................................................................................4
Test Case# 05 (Valid input)...................................................................................5
Test Case# 06 (Invalid input).................................................................................5
Test Case# 07 (Invalid input).................................................................................6
Boundary Value Analysis:......................................................................................7
Program (Source code):..........................................................................................7
Possible Outputs...............................................................................................8
Class Diagram Explanation:.................................................................................10
Software Testing Assignment# 02 FA19-BSE-168
Question:
Write a program which control value of the robot. The charging min value is zero and max value
is 100. When the charger is not plugged, the robot is in discharging state and the battery
decreases. When charger is attached, the state is changed to charging and the value increase.
Once it reaches the max limit, the state changes to battery full.
a) Write test cases for the battery level.
Test Cases
TC ID# 02
TC Name: Battery Level
Pre-condition: charger is unplugged
TC ID# 03
TC Name: Battery Level
Pre-condition: charger is unplugged
TC ID# 04
TC Name: Battery Level
Pre-condition: charger is plugged
Software Testing Assignment# 02 FA19-BSE-168
TC ID# 05
TC Name: Battery Level
Pre-condition: charger is plugged
TC ID# 06
TC Name: Battery Level
Pre-condition: charger is plugged
Software Testing Assignment# 02 FA19-BSE-168
TC ID# 06
TC Name: Battery Level
Pre-condition: charger is plugged
Possible Outputs
Software Testing Assignment# 02 FA19-BSE-168
Software Testing Assignment# 02 FA19-BSE-168
Relationship Explanation:
Department has composite (strong) relation with school because without school department
doesn’t exists. And the student has weak relation with school. Many students attend many
courses. Instructor is weakly connected to department and has assigned one or many departments
and teach one or more courses to the assigned department(s). Moreover, many departments have
many courses associated to them.
Functionality:
School/admin can add/ remove/view student(s) and view department(s), department can
add/remove/view instructor(s).
________________