Ask Question
30 September, 05:49

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.

+1
Answers (1)
  1. 30 September, 06:08
    0
    public void setAge (int new_Age) {

    age = new_Age;

    }

    public int getAge () {

    return age;

    }
Know the Answer?
Not Sure About the Answer?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers