Ask Question
27 July, 14:37

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. 27 July, 17:05
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers