Question: This coding should be solved by implementing the algorithm given above using the objects from this umI: - n: int - p: int + Gaussian
This coding should be solved by implementing the algorithm given above using the objects from this umI: - n: int - p: int + Gaussian Easter(y:int) + getN(): int + getP(): int My output should look like this: Year: 2001 Month: 4 Day: 15
This is what I have so far

14 This class computes the month and day of Easter given the year. The only 15 instance variables allowed are n (the month) and p (the day). 16 17 18 public class GaussianEaster f 19 public GaussianEaster(int y) f 21 23 24 25 26 27 28 29 30 31 32 int a = y % 19; int b y100; int c = y 100; int d=b/4; int e = b % 4; intg(8*b+ 13) / 25; int h=(19 * a + b-d-g+15) % 30; int j c/ 4; int k- c % 4; int m (a 11 h) / 310; int n=(h-m+r+90) / 25; int p = (h-m+r+n+19) % 32; 34 35 36 public int getN) int n= ; return n; 038 39 40 41 42e public int getP() I int pE; return p; 043 45 46 47 27 public static void main(String args) 28 29 30 31 32 GaussianEaster n -new GaussianEaster (2001); System.out.println(n.getN)); System.out.println (n.getPO)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
