Please answer all of the questions or the ones you have the answer too. No expla
ID: 3707723 • Letter: P
Question
Please answer all of the questions or the ones you have the answer too.
No explanation needed, just the answer.
Thank you!
Explanation / Answer
Answers)
41) In the scenario described in the accompanying figure, what will the first statement do?
The class Car and subclass Honda both have the method speed. rentalH refers to the object of type Honda.
Thus we execute rentalH.cost(); we will:
a. The cost method in Honda will be called.
42) Which of the following statements about the reference super is true?
super.speed();
Thus by using the above statement, true are:
a. It must be used every time a method from the superclass is called.
c. It must be the first statement of the subclass constructor
43) Based on the diagram in the accompanying figure, the method setDimension in the class Box ____ the method setDimension in the class Rectangle.
b. overrides
This is because the method setDimension(double, double : void) exists in the class Rectangle.
The method setDimension (double, double, double) : void is in the Box class which extends the Rectangle class, and thus setDimension is overridden.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.