4 ms·
Your implementation has lost the encapsulation of mine, and broken the call-graph relationships. For example: - Updates and bug-fixes to the `isOdd` function w
by chriswarbo 4y ago
Your implementation has lost the encapsulation of mine, and broken the call-graph relationships. For example:
- Updates and bug-fixes to the `isOdd` function will not be inherited by your `isEven` function.
- If I set a breakpoint in this function, it won't get triggered when I call `isOdd`.
- Your `isEven` function requires an implementation of `!`
- etc.
- twic 4y ago> - Updates and bug-fixes to the `isOdd` function will not be inherited by your `isEven` function. > - If I set a breakpoint in this function, it won't get triggered when I call `isOdd`. boolean isOdd(int n) { return !isEven(n); } > - Your `isEven` function requires an implementation of `!` Yes, but this language has one, so that's fine.