solution

solution.

Consider this program. What will be the exact output when it is executed? // Icalc.java public interface Icalc { int ALPHA = 9; int calc(int n); } 1/ A.java public class A implements Icalc { private int mx; public A(int px) { mx = px; } public int x( { return mx; } public int calc(int n) { return n + x0) + ALPHA; } public string tostringo { return *” + calc(); } } 1/ B.java public class B implements Icalc { private int meta; public B(int pBeta) { mBeta = poeta; } public int beta() { return mBeta; } public int calc(int n) { return n = -beta() – ALPHA; } public String tostring() { return ” + calc(beta(); } } 1/ C.java public class C extends B { public co { super(1); } public c(int x) { super(x); } public c(A a) { super(a.calc(1)); } public c(Bb) { this(); } } 1/ Main.java public class Main { public static void main(String[] args) { A al = new A(1); System.out.print(a1.tostring(); B b1 = new B(2); System.out.print(bi.tostring(); C C1 = new CO; System.out.print(c1.tostring(); B b2 = new C(3); System.out.print(b2.tostring(); C C2 = new C(4); System.out.print(c2.tostring(); C 3 = new C(al); System.out.print(3.tostring(); C 04 = new Cb1); System.out.print(c4.tostring(); C C5 = new C(c1); System.out.print(c5.tostring(); }

solution

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now