A security technician is investigating a system that tracks inventory via a batch update each night. The technician is concerned that the system poses a risk to the business, as errors are occasionally generated and reported inventory appears incorrect. The following output log is provided:

The technician reviews the output of the batch job and discovers that the inventory was never less than zero, and the final inventory was 100 rather than 60.
Which of the following should the technician do to resolve this issue?
- Ensure that the application is using memory-safe functions to prevent integer overflows.
- Recommend thread-safe processes in the code to eliminate race conditions.
- Require the developers to include exception handlers to accommodate out-of-bounds results.
- Move the batch processing from client side to server side to remove client processing inconsistencies.
Answer(s): C
Explanation:
The issue described in the log shows that, at one point, the inventory goes below zero (transaction 5 where the operation is -40, resulting in a negative balance of -10). However, despite this, the final inventory is reported as 100 rather than 60, suggesting that the system is not correctly handling situations where the inventory goes below zero, or there is an error in reporting or updating the total.
By including exception handlers in the code to manage out-of-bounds results, the developers can ensure that the system correctly handles situations where negative inventory would otherwise occur or other logical errors take place. Exception handling can ensure that invalid operations are either prevented or properly logged and managed, which resolves the problem of inconsistent inventory reporting.
Reveal Solution
Next Question