Question: IF I Liv: Introauction to Java Technologies home > 7 . 4 : Mutators, accessors, private helpers ACTIVITY 1 . 4 . 2 : Mutators,
IF I Liv: Introauction to Java Technologies home : Mutators, accessors, private helpers
ACTIVITY
: Mutators, accessors, and private helpers.
zay
Jump to level
Define the Student class's getName accessor that gets field name and the getAge accessor that gets field age. Ex: If the input is Ron then the output is:
Student: Ron
Age: years old
StudentInfo.java
public class Student
private Stringname;
private int age;
public void setNamString inputName
name inputName;
public void setAgeint inputAge
age inputAge;
Y Your code goes here
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
