Question: Write a mutator method ( both header and body ) for an instance variable of type int with the identifier age. Your method should validate
Write a mutator method both header and body for an instance variable of type int with the identifier age. Your method should validate the parameter to the method to ensure that improper values are not accepted. Only values in the range inclusive are considered valid. If a parameter is outside of the acceptable range of values your method should not modify the previous value of the field age.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
