Answer:
3. set , get
Step-by-step explanation:
Accessor instance method are the properties of a class member variable. These methods are used to either get the values of the variable of the class or to set or initialize the member variable values of the class.Every member variable of the class should have these accessor instance methods ideally. These are of 2 types -
- set() - The return type of this method is void as this does not return anything and its takes argument of same datatype as the variable whose value is to be initialized . For example - void set (string name){ this.name=name;}
- get() - This method returns the data type same as the variable as this is used to get the value of that member variable and it accepts no arguments. For example - string get () { return this.name; }