SOURCE CODE FILES FOR THE Overloaded EXAMPLE -------------------------------------------------------------------------- // Project Overloaded // Class Main // Test three overloaded versions of the repeatLines method. public class Main { public static void main(String[] args) { // Version 1. repeatLines(); System.out.println(); // Version 2. repeatLines("I will not throw spitballs."); System.out.println(); // Version 3. repeatLines("I will not talk in class.", 15); System.out.println(); } // Overloaded repeatLines method, version 1. public static void repeatLines() { int i; for(i = 1; i <= 20; i++) System.out.println(i + ". " + "I will not talk in class."); } // Overloaded repeatLines method, version 2. public static void repeatLines(String line) { int i; for(i = 1; i <= 20; i++) System.out.println(i + ". " + line); } // Overloaded repeatLines method, version 3. public static void repeatLines(String line, int times) { int i; for(i = 1; i <= times; i++) System.out.println(i + ". " + line); } } --------------------------------------------------------------------------