/** * 2023 - FRQ 2 You need to write the constructor * and the 2 methods described in the question */ public class Sign { /** * write your code here */ public static void main(String[] args) { System.out.println("This tests your answer to 2023 FRQ 2"); Sign s1 = new Sign("Everything on sale, please come in",15); Sign s2 = new Sign("Everything on sale, please come in",17); Sign s3 = new Sign("Everything on sale, please come in",40); System.out.println("Page 8 examples:\ns1.numberOfLines returns:"+s1.numberOfLines() + "(should be 3)" ); System.out.println("s2.numberOfLines returns:"+s2.numberOfLines() + "(should be 2)" ); System.out.println("s3.numberOfLines returns:"+s3.numberOfLines() + "(should be 1)" ); System.out.println("\nPage 9 examples:"); String str; int x; Sign sign1 = new Sign("ABC222DE",3); x = sign1.numberOfLines(); System.out.println("x = sign1.numberOfLines() returns "+x+"(should be 3)"); str = sign1.getLines(); System.out.println("str = sign1.getLines() returns '"+str+"'(should be 'ABC;222;DE')"); Sign sign2 = new Sign("ABCD",10); x = sign2.numberOfLines(); System.out.println("x = sign2.numberOfLines() returns "+x+"(should be 1)"); str = sign2.getLines(); System.out.println("str = sign2.getLines() returns '"+str+"'(should be 'ABCD')"); Sign sign3 = new Sign("ABCDEF",6); x = sign3.numberOfLines(); System.out.println("x = sign3.numberOfLines() returns "+x+"(should be 1)"); str = sign3.getLines(); System.out.println("str = sign3.getLines() returns '"+str+"'(should be 'ABCDEF')"); Sign sign4 = new Sign("",4); x = sign4.numberOfLines(); System.out.println("x = sign4.numberOfLines() returns "+x+"(should be 0)"); str = sign4.getLines(); System.out.println("Does str = sign4.getLines() return a null? '"+(str==null)+"'(should true)"); Sign sign5 = new Sign("AB_CD_EF",2); x = sign5.numberOfLines(); System.out.println("x = sign5.numberOfLines() returns "+x+"(should be 4)"); str = sign5.getLines(); System.out.println("str = sign5.getLines() returns '"+str+"'(should be 'AB;_C;D_;EF')"); } }