Which two are true about the lines labeled A through D?

Given:

Which two are true about the lines labeled A through D?

Given:

Which two are true about the lines labeled A through D?

A.
The code compiles and runs as is.

B.
If only line A is removed, the code will compile and run.

C.
If only line B is removed, the code will compile and run.

D.
If only line D is removed, the code will compile and run.

E.
Line C is optional to allow the code to compile and run.

F.
Line C is mandatory to allow the code to compile andrun.

Explanation:

A: The code will compile. The abstract method doDock() is implemented fine, and doFloat()
isoverridden.
E: Line C overrides the implementation of doFloat(). This is optional.



Leave a Reply 5

Your email address will not be published. Required fields are marked *


Tim

Tim

C E. The abstract class Boat cannot be newed.

BKhateib

BKhateib

C E are the answer

Humberto Bañuelos Flores

Humberto Bañuelos Flores

class Boat can not be instantiated