Type Paste Question Assignment Content One Capabilities Makes Object Oriented Programming Q43833404
Type or paste question
Assignment Content
-
One of the capabilities that makes object-oriented programmingso powerful is inheritance because it allows programmers to modelreal-world relationships.
Answer the following two questions:
- What are the benefits of inheriting one or more derived classesfrom a base class? What are the drawbacks?
- The base class PatientRecord contains a variable Xdeclared as private, a variable Y declared as protected, and avariable Z declared as public. The classesInsuredPatientRecord and UninsuredPatientRecordboth derive from PatientRecord. Which of the base class’svariables, if any, can the derived classes access? Why?
here
Expert Answer
Answer to Type or paste question Assignment Content One of the capabilities that makes object-oriented programming so powerful is …
OR