Ask Question
20 September, 18:46

In the implementation of the getMax () function in the PriQueue class, we need to read and write the variables "front" and "rear", which are defined as protected members in the base class Queue. Are the functions in the derived class allowed to access the protected members in the base class?

+2
Answers (1)
  1. 20 September, 19:07
    0
    The answer to the given question is "yes".

    Explanation:

    In the programming language, Protected is a keyword that is used as an access modifier by using protected members we only access within the same class and it also provides access to use this member in the derived class that is inherited by derived class from the base class.

    That's why the answer to this question is "yes".
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “In the implementation of the getMax () function in the PriQueue class, we need to read and write the variables "front" and "rear", which ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers