Assertions should not be used to validate arguments passed to public methods True
Because the method gurantess that it will always enforce the argument check. It must check the arguments whether or not assertions are enabled.
Argument checking is typically part of the published specifications of a method. Another problem with using assertions fro argument checking is that erroneous arguments should result in an appropriate runtime exception. An assert failure will not throw an appropriate exception.
Assertions should not be used to validate the arguments passed to non public methods false
Becuase you know the arguments are true no matter what a client does with teh class
But you can
test the post conditions with assertions in both public and nonpublic methods.
post condition: what must be true after a method completes successfully Assertions should not be used with in the default case of a switch statement True: or False: ??? Ans according to Dan is Yes, but
Dan says: For example, a programmer may believe that the default case of a switch statement will never be reached. An assertion can be placed in the default case to verify the behavior of the switch statement.
Assertions should not be used to perform processing that is required for the normal operation of the application True:assertions can be disabled.