Which of the following lines are legal and which are illegal? The class Undergraduate is a derived class of Student, and Student is a derived class of Person. a. Person p1 = new Student(); b. Person...


Which of the following lines are legal and which are illegal? The class


Undergraduate is a derived class of Student, and Student is a derived


class of Person.


a. Person p1 = new Student();


b. Person p2 = new Undergraduate();


c. Student s1 = new Person();


d. Student s2 = new Undergraduate();


e. Undergraduate ug1 = new Person();


f. Undergraduate ug2 = new Student();


g. Object ob = new Student();


h. Student s3 = new Object();

Nov 19, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here