You are responsible for the integration testing of a system that encrypts network traffic. This system includes a key generator subsystem that uses random numbers. During integration testing, you use a stub implementation of the key generator that produces a predictable result. However, for the release version of the system, you want to substitute the stub implementation with the random implementation, so that the generated keys are not predictable to an outsider. Implement a test infrastructure using one of the design patterns described in Chapter 8, Object Design: Reusing Pattern Solutions to enable the exchange of these two key generator implementations at run time. Justify your choice.
What will be an ideal response?
We use a bridge pattern to substitute different implementations of the random number generator at run time.
Computer Science & Information Technology
You might also like to view...
The shortcut key to duplicate a shape is:
A) [Alt + D]. B) [Ctrl + D]. C) [Shift + D]. D) [Windows Key + D].
Computer Science & Information Technology
Answer the following statements true (T) or false (F)
1. The std::array class allows for safe access to the array contents. 2. You can dynamically add and remove items from a std::array like you can with a vector. 3. Code that runs in threads will run sequentially, one after the other. 4. The t.wait() function will wait for thread t to finish.
Computer Science & Information Technology