Question: Label the following methods as accessor, mutator, constructor, or additional operation: public void setName(String name) { this.name = name; } public int getID() { return
Label the following methods as accessor, mutator, constructor, or additional operation:
- public void setName(String name) { this.name = name; }
- public int getID() { return id; }
- public Student(String name, int id) {this.name = name; this.id = id; }
- public void print() { System.out.println("Name: " + name + " Id: " + id); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
