subject

Consider the following class descriptions and code. Account is an abstract class with one abstract method named getInterestRate. BasicCheckingAccount is a concrete class that extends Account. EnhancedCheckingAccount extends BasicCheckingAccount and overrides getInterestRate.

Account acct;
double rate1, rate2;
acct = new BasicCheckingAccount(< parameters not shown >);
rate1 = acct. getInterestRate(); // assignment 1
acct = new EnhancedCheckingAccount(< parameters not shown >);
rate2 = acct. getInterestRate(); // assignment 2

The reference to getInterestRate in assignment 2 is to the class

a. Account

b. EnhancedCheckingAccount

c. SavingsAccount

d. The code cannot run, because the variable acct cannot be assigned to an EnhancedCheckingAccount object in the line before assignment 2.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Which of the statements below is true? the formatting, standard, and drawing commands are unavailable. the formatting, standard, and drawing commands have been used. the formatting, standard, and drawing toolbars are displayed. the formatting, standard, and drawing toolbars are hidden.
Answers: 1
question
Computers and Technology, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
What is the total resistance in a circuit that contains three 60 ohm resistors connected in a series? a. 20 ohms b. 120 ohms c. 60 ohms d. 180 ohms
Answers: 2
question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
You know the right answer?
Consider the following class descriptions and code. Account is an abstract class with one abstract m...
Questions
question
Chemistry, 29.01.2020 19:45
question
English, 29.01.2020 19:45
question
Mathematics, 29.01.2020 19:45
question
Mathematics, 29.01.2020 19:45
question
English, 29.01.2020 19:45
Questions on the website: 13722359