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 18:30
Which of the following is an example of intellectual properly! oa. new version of a novelb. journal of ideasc. pages of a bookood. lines of a poem
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
What machine listens for http requests to come in to a website’s domain? a. a router b. a browser c. a server d. a uniform resource locator
Answers: 1
question
Computers and Technology, 23.06.2019 08:30
Helen's credit card has an apr of 15.32% and a grace period of 17 days and helen pays her balance in the full every month. if her last billing cycle ended on september 26, 2009, and she made her payment on october 11, 2009, did she owe any interest on her last statement's balance?
Answers: 3
question
Computers and Technology, 23.06.2019 22:00
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
You know the right answer?
Assume a base, base has a derived class, sub.. also, assume a method called methodx() is defined in...
Questions
question
Mathematics, 30.01.2021 23:50
question
Mathematics, 30.01.2021 23:50
Questions on the website: 13722362