Question: 2. Create a class, Interface and an Abstract classs. Write the similarities and difference between each one of them. 3. Assume that we have four

 2. Create a class, Interface and an Abstract classs. Write the

2. Create a class, Interface and an Abstract classs. Write the similarities and difference between each one of them. 3. Assume that we have four classes: Person, Teacher, Student, and PhDStudent. Teacher and Student are both subclasses of Person. PhDStudent is a subclass of Student. i. Which of the following assignments are legal, and why or why not? Person p1 = new Student () Person p2= new PhDStudent() PhDStudent phd 1 = new Student () Teacher tl= new Person( ) Student s 1= new PhDStudent()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!