Upgrade to access all content for this subject
If a method is called in violation of a precondition, which of the following is a good choice for the action to be taken?
Reformat the hard drive.
Print a warning message to System.out.
Perform the calculation assuming the precondition is true.
Throw an exception.
Halt execution of the program.