Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Starting with the Count.j example, implement Butcher\'s Easter Algorithm to calc

ID: 3884115 • Letter: S

Question

Starting with the Count.j example, implement Butcher's Easter Algorithm to calculate and print the date of Easter for the next 10 years in JVM assembly language.

THIS NEEDS TO BE ASSEMBLED WITH JASMIN. its a .jfile not a .java file

Butcher's Easter Algorithm

Butcher's Algorithm to calculate Easter day for any year
in the Gregorian Calendar.

All values and calculations are integer only.

For a given year:

        a=year%19
        b=year/100
        c=year%100
        d=b/4
        e=b%4
        f=(b+8)/25
        g=(b-f+1)/3
        h=(19*a+b-d-g+15)%30
        i=c/4
        k=c%4
        x=(32+2*e+2*i-h-k)%7
        m=(a+11*h+22*x)/451
        Easter Month =(h+x-7*m+114)/31 [3=March, 4=April]
        p=(h+x-7*m+114)%31
Easter Date=p+1     (date in Easter Month

Explanation / Answer

Easter Sunday

public static DateTime EasterDate(int Y) {

    int a = Y % 19;

    int b = Y / 100;

    int c = Y % 100;

    int d = b / 4;                                   

    int e = b % 4;

    int f = (b + 8) / 25;

    int g = (b - f + 1) / 3;

    int h = (19 * a + b - d - g + 15) % 30;

    int i = c / 4;

    int k = c % 4;

    int X = (32 + 2 * e + 2 * i - h - k) % 7;

    int m = (a + 11 * h + 22 * X) / 451;

    int month = (h + X - 7 * m + 114) / 31;

    int day = ((h + X - 7 * m + 114) % 31) + 1;

    DateTime dt = new DateTime(Year, month, day);

    return dt;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote