Ask Question
13 September, 07:07

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?

+3
Answers (1)
  1. 13 September, 07:48
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers