Ask Question
19 December, 09:32

EX 4.11 Suppose you have a class called Child with an instance data value called age. Write a getter method and a setter method for age.

+5
Answers (1)
  1. 19 December, 12:03
    0
    public void setAge (int new_Age) {

    age = new_Age;

    }

    public int getAge () {

    return age;

    }
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “EX 4.11 Suppose you have a class called Child with an instance data value called age. Write a getter method and a setter method for age. ...” 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