//Programmed by Lasse Albrechtsen import java.util.Scanner; public class WendlerProgram { public void jimWendler() { System.out.println("This is Jim Wendler 5/3/1 program. \nThe following numbers are the lifting schedule:"); Scanner console = new Scanner(System.in); System.out.println("Enter length of program in amount of total cyclusses:"); int cyclusCount = console.nextInt(); System.out.println("Enter name for first exercise:"); String ex1 = console.next(); System.out.println("Enter your max in kg's for first exercise:"); double kg1 = console.nextDouble(); System.out.println("Enter amount of kg's you want for first exercise, as progress for each cyclus:"); double pro1 = console.nextDouble(); System.out.println("Enter name for second exercise:"); String ex2 = console.next(); System.out.println("Enter your max in kg's for second exercise:"); double kg2 = console.nextDouble(); System.out.println("Enter amount of kg's you want for second exercise, as progress for each cyclus:"); double pro2 = console.nextDouble(); System.out.println("Enter name for third exercise:"); String ex3 = console.next(); System.out.println("Enter your max in kg's for third exercise:"); double kg3 = console.nextDouble(); System.out.println("Enter amount of kg's you want for third exercise, as progress for each cyclus:"); double pro3 = console.nextDouble(); System.out.println("Enter name for fourth exercise:"); String ex4 = console.next(); System.out.println("Enter your max in kg's for fourth exercise:"); double kg4 = console.nextDouble(); System.out.println("Enter amount of kg's you want for fourth exercise, as progress for each cyclus:"); double pro4 = console.nextDouble(); for (int i = 1; i <= cyclusCount; i++) { System.out.println("\nCyclus " + i + " :"); exercise(ex1, kg1, i, pro1); exercise(ex2, kg2, i, pro2); exercise(ex3, kg3, i, pro3); exercise(ex4, kg4, i, pro4); } console.close(); } private static void exercise(String ex, double kg, int i, double pro) { System.out.println("\n" + ex); System.out.println("\nweek 1:"); System.out.println("set 1 = " + calc(kg, pro, 0.65, i)); System.out.println("set 2 = " + calc(kg, pro, 0.75, i)); System.out.println("set 3 = " + calc(kg, pro, 0.85, i)); System.out.println("\nweek 2:"); System.out.println("set 1 = " + calc(kg, pro, 0.70, i)); System.out.println("set 2 = " + calc(kg, pro, 0.80, i)); System.out.println("set 3 = " + calc(kg, pro, 0.90, i)); System.out.println("\nweek 3:"); System.out.println("set 1 = " + calc(kg, pro, 0.75, i)); System.out.println("set 2 = " + calc(kg, pro, 0.85, i)); System.out.println("set 3 = " + calc(kg, pro, 0.95, i)); System.out.println("\nweek 4:"); System.out.println("set 1 = " + calc(kg, pro, 0.40, i)); System.out.println("set 2 = " + calc(kg, pro, 0.50, i)); System.out.println("set 3 = " + calc(kg, pro, 0.60, i)); } private static double calc(double kg, double pro, double perc, int i) { return Math.round((((kg*0.9)+((i-1)*pro))*perc) * 2/5) * 5.0/2; } }