Menu

Tiple Choice Questions 1 10 4 Points E Questions 1 4 Use Following Partial Class Definitio Q43890354

hi I need help answering these questions.
TIPLE CHOICE QUESTIONS 1-10. (4 points each) e questions 1-4 below, use the following partial class definitions: public classTIPLE CHOICE QUESTIONS 1-10. (4 points each) e questions 1-4 below, use the following partial class definitions: public class A protected int b; private int ; public void doThis) b2; C3b; System.out.println (b+”, “+c); public int gets() { return b; } public class B extends Al private int d; public void do this super.do This(); // line 4 deb System.out.println b”,”+d); public class Tester public static void main(String[] args) A new B() a.doThis(); // line 1 71 line 2 System.out.println(a.get(); // line 3 1. Which of the following is true with respect to A, B and Tester? a. Bis a subclass of A and A is a subclass of Tester b. B is a subclass of A but A is not a superclass of B c. A is a superclass of B and Tester is not a subclass of A d. Tester and B are both subclasses of A e. None of the above 2. Which of the following data are accessible in class B? a. a, b, c, d b. b, c, d c. b, d, do This d. b, d e. None of the above 3. What is True about the lines commented as line 1, line 2, line 3, respectively, in class Tester: a. Line I will compile but line 2 will throw an exception b. Line 1 and line 2 will run and print only the values of b, and d c. Line I will not compile because type of a does not match the type of object d. Line 3 will not compile because class B does not contain a method getB() Show transcribed image text TIPLE CHOICE QUESTIONS 1-10. (4 points each) e questions 1-4 below, use the following partial class definitions: public class A protected int b; private int ; public void doThis) b2; C3b; System.out.println (b+”, “+c); public int gets() { return b; } public class B extends Al private int d; public void do this super.do This(); // line 4 deb System.out.println b”,”+d); public class Tester public static void main(String[] args) A new B() a.doThis(); // line 1 71 line 2 System.out.println(a.get(); // line 3 1. Which of the following is true with respect to A, B and Tester? a. Bis a subclass of A and A is a subclass of Tester b. B is a subclass of A but A is not a superclass of B c. A is a superclass of B and Tester is not a subclass of A d. Tester and B are both subclasses of A e. None of the above 2. Which of the following data are accessible in class B? a. a, b, c, d b. b, c, d c. b, d, do This d. b, d e. None of the above 3. What is True about the lines commented as line 1, line 2, line 3, respectively, in class Tester: a. Line I will compile but line 2 will throw an exception b. Line 1 and line 2 will run and print only the values of b, and d c. Line I will not compile because type of a does not match the type of object d. Line 3 will not compile because class B does not contain a method getB()

Expert Answer


Answer to TIPLE CHOICE QUESTIONS 1-10. (4 points each) e questions 1-4 below, use the following partial class definitions: public …

OR