for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
sum++;
}
for (int j = 0; j < n; j++) {
sum++;
}
}
Exact answer = ______, giving an asymptotic answer of O( ______ ).
Pass into the method a BigRational object. Evaluate the object to determine if it is equal to it's own absolute value. If it is, print the message "Good going", and terminate the program. If it is not, print the message "Not good going", and terminate the program. Regardless of the outcome of this test, print the message "Done" before terminating.
Write this code twice: once using if-then-else block(s) to evaluate the data and handle a possible error, and once using a try-catch block to evaluate the data and handle a possible error.
Note: This code would never be written using a try-catch block in a production environment; we do it here to make sure you understand important structures.