Question: When the while loop finishes processing, print out total records, error record count, and valid format record count (with percentages for the last 2 rounded

When the while loop finishes processing, print out total records, error record count, and valid format record count (with percentages for the last 2 rounded to 2 decimal places). Put the code for this printout in the following method, and call this method from the main method. public static void printTotals()This method will print the output below. You can assume no more than 5,000 total records for formatting purposes (your output should be able to handle a total record count of 5,000 thus giving a comma and appropriate column spacing). You will have to MOVE the counters fromAssign 5 to be appropriate global static variables in the MakeCustObject class so that both the main method and the printTotals method can access these variables.x, xxx total records are in the file.Records with errors x,xxx (xx.xx)%Records are in valid format x,xxx (xx.xx)%

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 Programming Questions!