code: public void maxWeight(Assignment assignment, double weight) {
      setWeight(assignment, Math.max(getWeight(assignment), weight));
    }
docs: Sets the weight of {@code assignment} to
  {@code Math.max(getWeight(assignment), weight)}.
  
  @param assignment
  @param weight