Ask Question
18 August, 16:25

Which of the following method headers is most likely a header for a mutator method? a. public int getAge () b. public double computeSalary () c. public Person () d. public void setAge (int newAge) e. none of these are headers for a mutator method

+1
Answers (1)
  1. 18 August, 19:25
    0
    d. public void setAge (int newAge)

    Explanation:

    Mutator method is a term used in computer science to describe a method responsible for controlling possible changes in a variable in the computational environment. This method is commonly used in programming that uses the principle of encapsulation to program objects, as they appear at different hierarchical levels that these objects may present. It is also used in other types of programming, but it is more rare.

    Anyway, an excellent hair to be used in the mutator method is public void setAge (int newAge). This is because this header allows the programmer to be able to establish all the necessary codes for the file to be usable.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following method headers is most likely a header for a mutator method? a. public int getAge () b. public double computeSalary ...” in 📙 Social Studies 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