Question 1
Back to Exercise
Which relationship should class Car : public Vehicle express?
- A Car HAS-A Vehicle
- B Car IS-A Vehicle Correct
- C Vehicle IS-A Car
- D Car USES-A Vehicle
Correct Answer: Option B
Public inheritance means a Car can be used wherever a Vehicle is expected. HAS-A relationships use composition.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!