For this assignment, you will be given the executable code that implements the functionalities for the following problem.
Problem description
UW-L has many rooms in every building. All rooms have locks which can be opened by physical keys or swipe cards. The term 'key' is used in this assignment to represent a physical key or a swipe card. The distinction between the two types is made clear wherever it is necessary. Every lock must be opened by at least one key. Every key must open at least one lock. Some keys, called Master keys, may open more than one lock. Swipe cards cannot be used as Master keys, and hence each swipe card will open only one lock. All Master keys are therefore physical keys and they can open more than one lock. Notice that it is not necessary that every physical key is a Master key.
Every lock has the following information: lock number (unique - represented as an integer), the room number where the lock is located, and a set of keys (both physical keys and swipe cards) that can open the lock. Each key has the following information: key number (unique - represented as an integer), key type (physical or swipe card), and a set of locks that the key can open. The following operations must be supported:
Initial data set
When the program starts, the following data is already initialized (through hardcoding). The program does not use any data store (files or databases), and so when the program terminates, all changes and results will be gone.
Keys
Key number | Key type | Is a Master key? | Associated Locks |
1 | Swipe card | No | 1001 |
2 | Swipe card | No | 1002 |
3 | Swipe card | No | 1003 |
4 | Swipe card | No | 1004 |
5 | Swipe card | No | 1005 |
6 | Swipe card | No | 1006 |
7 | Swipe card | No | 1007 |
8 | Swipe card | No | 1008 |
9 | Physical key | Yes | 1009, 1003, 1007 |
10 | Physical key | Yes | 1010, 1005 |
11 | Physical key | Yes | 1011, 1007 |
12 | Physical key | Yes | 1012, 1001, 1009, 1003 |
13 | Physical key | Yes | 1013, 1001, 1010 |
14 | Physical key | Yes | 1014, 1012 |
15 | Physical key | Yes | 1015, 1013 |
Locks
Lock number | Room number | Associated Keys |
1001 | 101 | 1, 12, 13 |
1002 | 102 | 2 |
1003 | 103 | 3, 9, 12 |
1004 | 104 | 4 |
1005 | 105 | 5, 10 |
1006 | 201 | 6 |
1007 | 202 | 7, 9, 11 |
1008 | 203 | 8 |
1009 | 204 | 9, 12 |
1010 | 205 | 10, 13 |
1011 | 301 | 11 |
1012 | 302 | 12, 14 |
1013 | 303 | 13, 15 |
1014 | 304 | 14 |
1015 | 305 | 15 |
Click here to get the executable program.
What you are supposed to do?
Test the GUI for this problem. Your testing must include (1) testing of all controls and (2) all functionalities. To test all the controls, list all controls (buttons, drop down boxes etc.) and give a statement whether they are working. Also, indicate whether each control is appropriate for the task it is created for. Notice that several of these controls are hidden and appear only when you select a functionality to test. To test the functionalities, you should use at least one test case with valid inputs and one test case with invalid inputs (if possible) for every functionality. For some functionalities (e.g., display all keys), you may not have the possibility of entering invalid inputs.
Your report must include two parts. The first part must include what controls and navigation mechanisms you tested and whether they worked. The second part must include a table showing each functionality, the corresponding inputs, expected output and actual output.