03: Unit Tests

Submit this homework using Gradescope. You can type up your answers, or write legibly and scan them. Do not attempt to submit a paper copy in class, as it will not be accepted.


Write a single concise, correct, and well-formed test method for each of the following requirements. Remember the decorator (@Test), and use the appropriate assertion (which should be one of assertEquals, assertTrue, or assertFalse). (1 point each)

  1. Test the toLowerCase method of String on the string "ASDF".
  2. Test the isLetterOrDigit method of Character on each of the characters 'A', '&', and '2'. (Use three assertions, all in one method.)
  3. Test the max method of Math on two int arguments of your choice.
  4. Test the min method of Math on the same arguments you used in the previous test.