Difference between revisions of "Optional Assignment"

From CSE425S Wiki
Jump to navigation Jump to search
Line 8: Line 8:
  
 
=Test=
 
=Test=
 +
 +
NOTE: in order to test this studio you must first complete the main (non-app) part of the [[ImmutableList_Assignment|ImmutableList<E> studio]].
 +
 
{{TestSuite|MaxTestSuite|optional.assignment}}
 
{{TestSuite|MaxTestSuite|optional.assignment}}

Revision as of 05:47, 22 September 2020

Note this studio is required. It helps us gain experience using java.util.Optional<T>.

Code To Implement

Max

class: Max.java Java.png
methods: max
package: optional.assignment
source folder: src/main/java
public static Optional<Integer> maximum(ImmutableList<Integer> xs)

Test

NOTE: in order to test this studio you must first complete the main (non-app) part of the ImmutableList<E> studio.

class: MaxTestSuite.java Junit.png
package: optional.assignment
source folder: src/test/java