Skip to content

Commit 16709f6

Browse files
docs: add reqs and test oracles
1 parent b3ea1e2 commit 16709f6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

courseProjectDocs/requirements-and-oracles.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
The described data structures should be able to:
66
1. **Traversal:** Enable traversal methods (e.g., in-order, pre-order, post-order for trees; forward/backward for linked lists).
77
2. **Sorting:** Provide built-in or integrable sorting mechanisms where applicable.
8+
3. **Search & Access:** Support efficient search and retrieval of elements.
9+
4. **Error Handling:** Gracefully handle invalid operations (e.g., removing from an empty queue).
810

911

1012
## Non-Functional Requirements
1113

1214
The data structure should ensure:
1315
1. **Testability:** Design should allow easy integration with unit testing frameworks.
16+
2. **Performance / Efficiency:** Operations should be optimized for time and space complexity (e.g., O(1) for stack push/pop).
17+
3. **Scalability:** Data structures should handle large datasets without significant performance degradation.
1418

1519

1620
## Test Oracles
@@ -19,4 +23,8 @@ The data structure should ensure:
1923
|----------------|------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
2024
| FR-1 | Enable traversal methods (e.g., in-order, pre-order, post-order for trees; forward/backward for linked lists) | Traversal methods should return elements in the correct sequence based on the traversal type. |
2125
| FR-2 | Provide built-in or integrable sorting mechanisms where applicable | Sorting operations should generate a correctly ordered sequence of elements. |
22-
| NFR-1 | Design should allow easy integration with unit testing frameworks | All public methods should be testable via standard unit testing frameworks. |
26+
| FR-3 | Support efficient search and retrieval of elements | For a known dataset, search operations should return the correct element or index in expected time (e.g., O(log n)). |
27+
| FR-4 | Gracefully handle invalid operations (e.g., removing from an empty queue) | Invalid operations should raise appropriate exceptions or return error codes without crashing.
28+
| NFR-1 | Design should allow easy integration with unit testing frameworks | All public methods should be testable via standard unit testing frameworks. |
29+
| NFR-2 | Data structures should handle large datasets without significant performance degradation | Usage with large datasets should show stable performance metrics and no memory overflows or timeouts. |
30+
| NFR-3 | Operations should be optimized for time and space complexity (e.g., O(1) for stack push/pop) | Operations should meet the expected time/space complexity bounds under typical scenarios. |

0 commit comments

Comments
 (0)