rn this.book; } Public double getCharge(double priceAmount){ priceAmount +=(float)getBook().getBookPr ice()*getBook().getDiscount() ; Return priceAmount; }} Change Method Signature public class ChatRecord { Public ChatRecord(String path) {} public void write(String t){}} public class ChatRecord { public ChatRecord(String path) {} public void writer(String t){}} Extrace method public static void setForeground(JEditorPane editor, Color fg) { if (editor != null) { if (fg != null) { MutableAttributeSet attr = new SimpleAttributeSet(); StyleConstants.setForegroun d(attr, fg); setCharacterAttributes(editor, public static void setForeground(JEditorPane editor, Color fg) { setGround(editor, fg); } private static void setGround(JEditorPane editor, Color fg) { if (editor != null) { if (fg != null) {