# 代做Project | 代做Math | Assignment代写 | Java – A Utility Class for Integer Collections

### Assignment

#### Something like the following is a start:

``````import java.util.ArrayList;
import java.util.List;
import java.util.Set;
public class IntegerCollectionsTest {
public static void main(String[] args) {
var list1 = List.of( 0 , 1 , 2 , 3 );
var list2 = List.of( 4 , 5 , 6 , 5 );
var set1 = Set.of( 3 , 2 , 1 , 0 );
var set2 = Set.of( 2 , 4 , 6 , 0 , 1 );
assert IntegerCollections.disjoint(list1, list2);
assert !IntegerCollections.disjoint(list1, set1);
var toFill = new ArrayList<>(list1);
IntegerCollections.fill(toFill, 0 );
assert toFill.equals(new ArrayList<>(List.of( 0 , 0 , 0 , 0 )));
assert IntegerCollections.frequency(toFill, 0 ) == 4 ;
assert IntegerCollections.frequency(set1, - 1 ) == 0 ;
assert IntegerCollections.isSorted(list1);
assert !IntegerCollections.isSorted(list2);
assert IntegerCollections.max(list2) == IntegerCollections.max(set2)
&& IntegerCollections.max(list2) == 6 ;
assert IntegerCollections.min(list1) == IntegerCollections.min(set2)
&& IntegerCollections.min(list1) == 0 ;
assert IntegerCollections.median(set2) == 2 ;
assert IntegerCollections.sum(set1) == 6 ;
assert IntegerCollections.mode(set2) == 0 ;
assert IntegerCollections.mode(List.of( 1 , 1 , 2 , 3 , 1 , 1 )) == 1 ;
assert IntegerCollections.mode(List.of( 1 , 2 , 2 , 1 , 2 )) == 2 ;
}
}
``````

### Due Date and Point Value

#### Assignment 06 is worth 80 points.

``````Possible point values per category:
-------------------------------------------------------
Correctly implemented methods 80
(roughly evenly distributed)
Possible deductions:
Invalid code style -10%
Other poor practices 1020%
-------------------------------------------------------
``````