Answered step by step
Verified Expert Solution
Question
1 Approved Answer
using System; namespace ConsoleApplication4 2 references abstract class A { public int i; 2 references public abstract void display( ); 3 references class B :
using System; namespace ConsoleApplication4 2 references abstract class A { public int i; 2 references public abstract void display( ); 3 references class B : A public int j; public int sum; 2 references public override void display() sum = i + j; Console. WriteLine( "Output is {0}, {1}, {2}", i, j, sum); 0 references class Program 0 references static void Main(string args) A obj = new B( ) ; obj. i = 2; B obj1 = new B( ) ; obj1. j = 10; obj . display ( ) ; Console. ReadLine ( )
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started