Question: here is the txt file public static void main(String[] args) { // Invoke the methods below to print output } /** * Call String.format with

 here is the txt file public static void main(String[] args) {

here is the txt file

public static void main(String[] args) { // Invoke the methods below to print output } /** * Call String.format with three integer arguments and * display them in reverse order. * @param num1 10 * @param num2 20 * @param num3 30 * @param num4 40 * * Output: * Fourth: 40 * Third: 30 * Second: 20 * First: 10 */ public static void reverseNums(add a parameter list here){ //#1 String reverse = String.format(add a format string here); //#2 System.out.println(reverse); } /** * Call String.format with three integer arguments and format * them to doubles. * @param num1 10 * @param num2 20 * @param num3 30 * @param num4 40 * * Output: * First: 10.00 * Second: 20.00 * First: 30.00 * Fourth: 40.00 */ public static void formatDoubles(add a parameter list here){ //#3 String result = String.format(add a format string here); //#4 System.out.println(result); } /** * Pad with zeros and a width of 5 chars. * @param (none) * * Output: * 00005 00015 * 00004 00014 * 00003 00013 * 00002 00012 * 00001 00011 */ public static void padZeros(){ //#5 for (int i = 5; i > 0; i--) { String result = String.format(add a format string here); //#6 System.out.println(result); } } /** * Round the number up and display it with 2 decimal places * @param num 3.14159 * * Output: * 3.14 */ public static void roundUp(add a parameter list here){ //#7 String result = String.format(add a format string here); //#8 System.out.println(result); } /** * Reverse the name strings and display in the order of capitalized * FirstName LastName. * @param name1 raseaC * @param name2 suiluJ * * Output: * JULIUS CAESAR */ public static void concattStrings(add a parameter list here){ //#9 StringBuilder builder1 = new StringBuilder(); StringBuilder builder2 = new StringBuilder(); //------------------------------------------------------------ //#10 //write code her to reverse the values of the two string args //------------------------------------------------------------ String result = String.format(add a format string here); //#11 System.out.println(result); } /** * Pad left and right and a width of 10 characters. * @param colors { "apricot", "yellow", "green", "black" } * @param animals { "rhino", "koala", "rabbit", "deer" } * * Output: * apricot rhino * yellow koala * green rabbit * black deer */ public static void padRightLeft(add a parameter list here){ //#12 for (write code here) { //------------------------------------------------------ //#13 //write code here to retrieve an element fromeach array //------------------------------------------------------ String result = String.format(add a format string here); //#14 System.out.println(result); } } /** * Format date and time * @param cal calendar (an instance of Calendar) * * Output: (It will vary depending on the date you set and * time you run the program) * Month: October Day: 29 Year: 2017 * Day: Sunday Sun 29 * Year: 2017 17 301 * Hour: 11 11 (note: 24- and 12-based time, respectively) * Minute: 43 * Second: 21 * AM/PM: am */ public static void displayDateAndTime(add a parameter list here){ //#15 String result = String.format(add a format string here); //#16 System.out.println(result); result = String.format(add a format string here); //#17 System.out.println(result); result = String.format(add a format string here); //#18 System.out.println(result); result = String.format(add a format string here); //#19 System.out.println(result); result = String.format(add a format string here); //#20 System.out.println(result); result = String.format(add a format string here); //#21 System.out.println(result); result = String.format(add a format string here); //#22 System.out.println(result); } 

y Minnesota Wild on Twitt 9 Course: FMIS 3232 Com: cpb18s-hw5.pdf Implement the main me: C Secure https//ay17.moodle.umn.edu/pluginfile.php/1657360/mod resource/content/11/cpb18s-hw5.pdf Apps DelUniversity of MinnesConnectMinneapolis/St. Pauumd-fmis.d.umn.edu Dashboard d. 2 points) Reverse the String str via an empty StringBuilder by appending characters in the reverse order, and print "Elapsed Time is xx msec (Using StringBuilder to reverse)" e. (2 points) Reverse the String str by creating a StringBuilder and invoking its reverse), and print "Elapsed Time is xx msec (Using StringBuidler's reverse() method)" 6. Test run your program before you submit your solution as part of a jar file Problem #2 (15 points): Overloading and formatting 1. 2. Add the package hw5p2 to your FirstName-LastName-HW5 project. Add a new class named OLFormatting with a main method to the hw5p2 package. Copy the code of the hw5p2Skeleton.txt file posted on the Moodle course site and paste it on to your class file. Complete the OLFormatting class as follows: 3. a. Complete the segments indicated by short directions (e.g., add a parameter list here) as well as marked by numbers (ie, #1, #2, and so on) while referring to the argument lists and outputs given in the "documentation comments" for the methods. One of the methods does not need a parameter list. All the methods must be overloaded b. a. The main method must only call the methods of the OLFormatting.java class. b. Hints: Arrays and date/time arguments must be prepared before calling methods. Use 4. Write code for the main of the OLFormatting.java as follows: LocalDateTime class to get the current local date and time 5. 6. The outputs from each method have to match the given outputs. Test run your program before you submit your solution as part of a jar file How to turn in your homework? See the homework assignment #1 directions. Make sure that the JRE System Library is included in your JAR file. eg 5:49 PM 3/14/2018 24

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!