Question: import java.util.List; public class Assembler { /** * Creates a new Assembler containing a list of fragments. * * The list is copied into this
import java.util.List;
public class Assembler {
/**
* Creates a new Assembler containing a list of fragments.
*
* The list is copied into this assembler so that the original list will not
* be modified by the actions of this assembler.
*
* @param fragments
*/
public Assembler(List
}
/**
* Returns the current list of fragments this assembler contains.
*
* @return the current list of fragments
*/
public List
return null;
}
/**
* Attempts to perform a single assembly, returning true iff an assembly was
* performed.
*
* This method chooses the best assembly possible, that is, it merges the
* two fragments with the largest overlap, breaking ties between merged
* fragments by choosing the shorter merged fragment.
*
* Merges must have an overlap of at least 1.
*
* After merging two fragments into a new fragment, the new fragment is
* inserted into the list of fragments in this assembler, and the two
* original fragments are removed from the list.
*
* @return true iff an assembly was performed
*/
public boolean assembleOnce() {
return false;
}
/**
* Repeatedly assembles fragments until no more assembly can occur.
*/
public void assembleAll() {
}
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
