which procedure is better and why?
1) a procedure that returns the smallest integer if an input array is empty
2. a procedure that requires a nonempty array
That depends entirely upon the purpose of the procedure. If the strictest requirement is the smallest integer in an array and the array is empty, then you have an exception.
Copyright © 2024 Q2A.ES - All rights reserved.
Answers & Comments
Verified answer
That depends entirely upon the purpose of the procedure. If the strictest requirement is the smallest integer in an array and the array is empty, then you have an exception.