Question: A class roster has students in it, as shown below. A Student has a name, and an age. Complete the class public class Student {
A class roster has students in it, as shown below. A Student has a name, and an age. Complete the class public class Student { private String name; private int age; ...
with
A default constructor
set methods for the two instance fields: for age it throws an IllegalArgumentException if the value is <= 0 or > 150
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
