Ask Question
6 January, 23:37

When applying strict "Private access" level to a component. Which services should the designer provide in its class to allow the object to communicate with the outside world? What should be the access level of these services?

+1
Answers (1)
  1. 7 January, 00:10
    0
    public accessor methods

    Explanation:

    When applying strict "Private access" level to a component the designer should provide public accessor methods in its class to allow the object to communicate with the outside world. The access level of these services must be public so that they can be accessed by other classes and objects of the outside world.

    Below is an example of such a class design in java : -

    class MyClass {

    private int num; / /private class component

    public int getNum () { / /public accessor method to allow the object to communicate with the outside world

    return num;

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “When applying strict "Private access" level to a component. Which services should the designer provide in its class to allow the object to ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers