In a vehicle management system, assume base class Vehicle has a property price.
Ola technical mcq question, verified with a worked answer. Free to practise - no sign-up.
In a vehicle management system, assume base class Vehicle has a property price. When subclass Car inherits from Vehicle, how does Car gain access to the superclass members?
Show answer & explanation
Answer: A. The subclass gains access to the public and protected members of the superclass
Accurate technical and quantitative evaluation based on foundational principles.
Step-by-step Derivation:
Step 1: Formulate problem conditions.
Step 2: Apply logical deduction.
Step 3: Conclude correct option.