/* An instance of this class represents a command by which a line ** of text within a document is replaced by another line of text. ** ** Authors: Gemini (AI), R. McCloskey, ** Collaborated with: ... ** Known defects: ... */ public class ReplaceCommand implements EditCommand { // instance variables // ------------------ // MISSING DECLARATIONS // constructor // ----------- /* Establishes this command as being such that its execution results ** in the specified text replacing whatever text is at the specified ** position. */ public ReplaceCommand(int lineNum, String newText) { // STUB } // observers // --------- @Override public String getName() { return "REPLACE"; } @Override /* Returns a string indicating the replacement text and location. ** If this command has been executed, it also indicates the text ** that was replaced. */ public String toString() { return ""; // STUB } // operations // ---------- @Override /* Applies this command to the specified document. */ public void execute(Document doc) { // STUB } @Override /* Reverses the effects of this command within the specified document. */ public void undo(Document doc) { // STUB } }