Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
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