Lab: Gaining Experience Formatting Strings and Output Name: Email: JAC#: Part 1. Command Syntax 1.2. What does it mean when something is enclosed in square brackets? 1.3. What do ellipsis (i.e., ...) indicate? 1.4. Interpret the following description of a command: javac [option]... filename.java Part 2. Creating Simple Formatted Strings 2.2. What output is generated? 2.5. What exception is thrown? Part 3. Creating Formatted Strings of a Particular Width 3.3. What output is generated? 3.6. What output is generated? 3.9. What output is generated? Part 4. Controlling Other Aspects of the Formatting 4.1. What String would be generated by String.format("%-10.2s", "CS239")? (Hint: Add the approrpiate code to FormattingOutputDriver and see.) 4.2. What String would be generated by String.format("%,5.2f", 12345.67)? 4.3. What String would be generated by String.format("%,20.2f", 12345.67)? 4.4. What String would be generated by String.format("%-,20.2f", 12345.67)? Part 5. Creating Strings with Complicated Formatting 5.1. What String would be generated by String.format("Sections: %d and %d", 1, 2)? 5.2. What String would be generated by String.format("CS%3.3s", 239)? 5.3. What String would be generated by result = String.format("2008: $%,10.2f\n2009: $%,10.2f", 92315.50, 105000.10);? Part 6. Formatting Output 6.1. What output would be generated by the following? (Be careful!) System.out.printf("Sections: %d and %d", 1, 2); System.out.printf("%,20.2f", 12345.67); 6.2. What output would be generated by the following? System.out.printf("Sections: %d and %d\n", 1, 2); System.out.printf("%,20.2f", 12345.67); Part 7. More on Formatting 7.1. What conversion(s) can be used to format an integer in hexadecimal (i.e., base 16)? 7.2. What conversion(s) can be used to format an integer in octal (i.e., base 8)? 7.3. What conversion(s) can be used to format a number in computerized scientific notation? 7.4. What flag will cause zero-padding? 7.5. What flag will cause negative numbers to be enclosed in parentheses? 7.6. What should you do if you need the String/output to include a percent sign?