| preferred AP College board partner for AP classes
AP Computer Science A/Unit 9: Inheritance
Start Practice TestPractice Test
About Exam
easy
Inheritance and Is-A Relationships
< Prev
Next >

Which of the following code segments demonstrates an ‘is-a’ relationship established through inheritance?

A
public class Cat { }
public class Dog { }
B
public class Quadrilateral { }
public class Rectangle extends Quadrilateral { }
C
public class Engine { }
public class Car {
    Engine engine = new Engine();
}
D
public class House {
    // House contains a door, not a type of door
    Door door;
}
Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy