subject

Assume a base, base has a derived class, sub.. also, assume a method called methodx() is defined in base and overridden in sub. for simplicity, let's say the only thing this method does is to print out "base" if base's methodx() is called and "sub" if the sub's methodx() is called.

main() has these lines, in this order, exactly, (and all other lines are correct and unrelated to these) :

base b = new base();
sub s = new sub();

b = s;
s. methodx();
b. methodx();
check the true statements (there may be one or more):

a. it will print:

sub
base
b. there are no compiler errors or warnings.
c. there will be a compiler warning which is not fatal, and main() will still run.
d. it will print:

base
sub
e. it will print:

sub
sub

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:00
Duplicating objects creates copies that a. move differently than the original object b. erase the original object c. look and act like the original object d. add events to a game
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Ulia is planning to attend the same private four-year college her parents attended. she wants to save at least $18,000 in four years to contribute to her college education. which monthly deposit amounts can julia use to achieve her goal? check all that apply.
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
What are some ways to use a range name in a formula? check all that apply. in the defined names group, click use in formula, and then select the desired name. begin typing the name in the formula, select a name from the autocomplete list, and use the arrow keys and tab key to enter the name in the formula. begin typing the formula, and then click and drag with the mouse to select the cells to include in the formula. right-click one of the cells in the range. click formula options, and use the dialog box to add the name.
Answers: 1
question
Computers and Technology, 23.06.2019 17:10
Ac++an of of pi. in , pi is by : pi = 4 – 4/3 + 4/5 – 4/7 + 4/9 - 4/11 + 4/13 - 4/15 + 4/17 . ., to pi (9 ). , if 5 to pi,be as : pi = 4 - 4/3 + 4/5 - 4/7 + 4/9 = 4 – 1. + 0.8 - 0. + 0. = 3.. atoofbe to pi?
Answers: 2
You know the right answer?
Assume a base, base has a derived class, sub.. also, assume a method called methodx() is defined in...
Questions