@@ -0,0 +1,1198 @@
+package project_2;%0A%0Aimport javax.swing.JOptionPane;%0A%0A/**%0A * Each new term in the Fibonacci sequence is generated by adding the previous%0A * two terms. By starting with 1 and 2, the first 10 terms will be:%0A *%0A * 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...%0A *%0A * By considering the terms in the Fibonacci sequence whose values do not exceed%0A * four million, find the sum of the even-valued terms.F%0A */%0Apublic class Problem_2 implements Runnable %7B%0A%0A    /**%0A     * @param args the command line arguments%0A     */%0A    public static void main(String%5B%5D args) %7B%0A        new Problem_2().run();%0A    %7D%0A%0A    @Override%0A    public void run() %7B%0A        int total = 0;%0A%0A        for (int i = 1; true; i++) %7B%0A            long num = fib(i);%0A            if (num %3E 4000000) %7B%0A                break;%0A            %7D%0A            if (isEven(num)) %7B%0A                total += num;%0A            %7D%0A        %7D%0A%0A//        System.out.println(total);%0A        JOptionPane.showMessageDialog(null, total);%0A    %7D%0A%0A    private long fib(long n) %7B%0A        if (n %3C= 2) %7B%0A            return 1;%0A        %7D else %7B%0A            return fib(n - 1) + fib(n - 2);%0A        %7D%0A    %7D%0A%0A    private boolean isEven(long num) %7B%0A        return (num %25 2) == 0;%0A    %7D%0A%7D%0A

Create Problem_2.java