Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

eUnderGrad What is the error in the above lines of code? a. UnderGrad b. In Prog

ID: 3915929 • Letter: E

Question

eUnderGrad What is the error in the above lines of code? a. UnderGrad b. In Program_1, aStudent (class Student) refers to an object of class UnderGrad. is a subclass of class Student, and UnderGrad is not correctly implemented c. In class UnderGrad, Student's attributes major and student Type - are referenced. d. No error at all. 29. Consider the following lines of code: public abstract class Student Declare attribute private long studentID protected String fullName; protected String major protected String student Type; Other methods public abstract void enrollot System.outprintin "This is Student:enroll method."): Il End of class Student public class UnderGrad extends Student . Declare attributes private String underGradLevel Other methods public UnderGrado major-Business", studentType "UNDERGRAD" public void enroll (String aClass)f System.out.printin This is UnderGrad:enroll method - enroll" + aClass+") End of class Car Underrad Which of the following is true? a. Abstract method in class Student should not specify a body. b. The variable major in UnderGrad class is out of its scope. c. The variable major in studentType class is out of its scope. Page 13 of 18

Explanation / Answer

Option a correct.