Question: Given the following class definition: public class Student { private int studentID; private String name; private Schedule schedule; public student(String name, int ID) { this.name
Given the following class definition:
public class Student { private int studentID; private String name; private Schedule schedule; public student(String name, int ID) { this.name = name ; studentID = ID; } // other methods }
Write the line(s) of code that creates the student with your name and an ID number of 41515. Explain what happens when the code is executed and what values, if any, the instance variables take on.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
