Question: Write one line of code that will call the first reset method in provided example, also write one line of code that will call the
Write one line of code that will call the first reset method in provided example, also write one line of code that will call the second reset method public class Student { private String studentName; private int studentNumber; public String getStudentName() { return studentName; } public void setStudentName(String studentName) { this.studentName = studentName; } public int getStudentNumber() { return studentNumber; } public void setStudentNumber(int studentNumber) { this.studentNumber = studentNumber; } public void reset (String newName, int newStudentNumber) { setStudentName(newName); setStudentNumber(newStudentNumber); } // end of reset method public void reset (String newName) { setStudentName(newName); setStudentNumber(0); } // end of reset method } // end of Student class
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
