Question: Q Question 5 16 marks] Circle the correct answer. Each part is worth 1 mark. 1) What must a subclass do to modify a private

 Q Question 5 16 marks] Circle the correct answer. Each partis worth 1 mark. 1) What must a subclass do to modifya private superclass instance variable a) The subclass must simply use thename of the superclass instance variable b) The subclass must declare itsown instance variable with the same name as the superclass instance variable.c) The subclass must use a public method of the superclass (if

Q Question 5 16 marks] Circle the correct answer. Each part is worth 1 mark. 1) What must a subclass do to modify a private superclass instance variable a) The subclass must simply use the name of the superclass instance variable b) The subclass must declare its own instance variable with the same name as the superclass instance variable. c) The subclass must use a public method of the superclass (if it exists) to update the superclass's private instance variable d) The subclass must have its own public method to update the superclass's private instance variable 2) Consider the following code public void deposit (double amount) transactionCount++ super.deposit (amount); Which of the following statements is true? a) This method will call itself. b) This method calls a public method in its subclass. c) This method calls a private method in its superclass. d) This method calls a public method in its superclass. 3) Consider the following code: public class Employee Page 5 of 16

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!