When the while loop finishes processing, print out total records, error record count, and valid format record
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 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)%
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall