Take a look at the classes shown below:
using System;
public class A{
private int i = 7;
protected int F(int j){
return i + j;
}
}
public class B : A{
public void G(){
Console.WriteLine("i: {0}", i);
Console.WriteLine("F(5): {0}", F(5));
}
}
public class Client {
public static void Main(){
B b = new B();
b.G();
}
} |
Answer the following questions before you run the program:
Run the program and confirm your answers.