/** * Represents a line of a script, including the speaker and content of the line */ public class ScriptLine { /** describes who speaks this line */ private String speaker; /** the contents of the line */ private String text; public ScriptLine(String speakerInput, String textInput){ this.speaker = speakerInput; this.text = textInput; } public String getSpeaker(){ return this.speaker; } public String getText(){ return this.text; } /** * Append text to the existing contents of the line * @param input the text to append */ public void addText(String input){ this.text = this.text + input; } }