JAVA
The source code below implements a program that creates studentand teachingstaff objects. Examine the code and answer the questionbelow;
public classStudentRecords{
public static voidmain(String[] args){
Student student = newStudent(“GCD001”, “Ciaran”);
TeachingStaff lecturer = newTeachingStaff();
// line to add student’smarks
// line to display the id,name and marks of the student
}
}
Briefly explain what happens when the new operator isinvoked? Complete the program to add student’smarks and display the student’s id, name and marks.
Expert Answer
An answer will be send to you shortly. . . . .