Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

can you help me do corrections on my quiz (if possible just problem number and answer) eunesive Questions 9 and 10 refer to the following

can you help me do corrections on my quiz
(if possible just problem number and answer)
image text in transcribed
image text in transcribed
eunesive Questions 9 and 10 refer to the following class definitions. public abstract class Phone abstract void dial() public class Mobile Phone extends Phone public class RotaryPhone extends Phone { public void dial ( [ //code not shown 9. Which of the following statements is true? a. RotaryPhone can be instantiated. b. Mobile Phone can be instantiated. c. Rotary Phone cannot be instantiated. d. Neither can be instantiated since you cannot extend an abstract class. e. Neither can be instantiated since they do not include constructors. 10. Which of the following statements is true? a. A Phone object can access methods in Mobile Phone. b. A RotaryPhone object can access methods in Mobile Phone. C. Rotary Phone inherits from phone and Mobile Phone. d. RotaryPhone inherits from Phone. e. None of the above. 11. Suppose a class implements the comparable interface. Which of the following method must the class include? a. length b. charAt c.substring d. indexOf e. compare To n o ni boram Questions 12-14 refer to the following: O dsed public class A public A () System.out.print("one"); eldste svaringshan A public A (int z) System.out.print("two "); un nano public void doStuff () { System.out.print("six "); TO U edhesive public class and puble System.out.printre publie tint vall serval) System.out.print out 12. What is printed when the following line of code is ere d? -new a one three b. two four four two d. three two one four 13. What is printed when the following line of code is executed? Aa- new (5) a four b. two four Cone d. two e. four one 14. Assume that variable b has been instantiated as a B object. What is printed when the following line of code is executed? b.doStuff(); a. six b. four c. five d. two e. three 15. Which of the following is true about interfaces: a. All methods in an interface must be abstract b. A class can only implement one interface. C. An interface can have only non abstract methods. d. None of the above. e. An interface can have variables. 16. What is the rule for a super reference in a constructor? a. It must be in the parent class' constructor. b. It must be the last line of the constructor in the child class. C. It must be the first line of the constructor in the child class. d. Only one child class can use it. e. You cannot use super in a constructor. Term 2.Unt 6 AP Computer Science A Edhesive

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions