You wrote a small code in C++ for a big software project that takes two numbers as input and the first number divides the second number. Once your work was done, the code was passed to Q/A for testing purposes and Q/A reported a bug on your code. As it raised an "exception error" while dividing the number by zero. How would you tackle such errors in C++ and ensure that no such errors are raised causing bugs in software projects. Elaborate the techniques you would use with an example and explanation? As object oriented design is an approach for doing object oriented programming. In OOD there is a saying that "Responsibility implies non-interference", What it actually means. Explain with appropriate examples in detail.
You wrote a small code in C++ for a big software project that takes two numbers as input and the first number divides the second number. Once your work was done, the code was passed to Q/A for testing purposes and Q/A reported a bug on your code. As it raised an "exception error" while dividing the number by zero. How would you tackle such errors in C++ and ensure that no such errors are raised causing bugs in software projects. Elaborate the techniques you would use with an example and explanation? As object oriented design is an approach for doing object oriented
Step by step
Solved in 2 steps with 2 images