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

Look at the following code and then answer the questions from Q3 to QS Person. p

ID: 3919837 • Letter: L

Question

Look at the following code and then answer the questions from Q3 to QS Person. public abstract class Person protected String person nane protected int age private String city public Person) System.out.printin( Constructor of Person class public void set name(String nane) ( public String get ane) C public veid set age(int .age) agepace public int get age) retura age public veid ny nethod) [ System.out.printin(I need te focus during the exan) public abstract vold disolay Infornation) public abstract void do _something) /Eployee java public class Esployee extends Person( private long enployee_id 533233 pubiic Enployee() Systes.out-printin( Constructor of Employee class) public veld set id(long id) enployee, id-id public long get 14 0 reture esplayee,id Override public veld display information) Systes.out.printin( Age:age): System.out.printin ID:enployee ) public vold do sonething) ( System.out.printin(I an an Enployee)

Explanation / Answer

Question 3
Answer:
The output of the given code is
constructor of the Person class
constructor of the Employee class
constructor of the Person class
constructor of the Student class

Question 4
Answer:
Given code will not compile because we can not create instance for abstract class.
abstract class can not instantiated.

Question 5
Answer:
The output of the given code is
constructor of the Person class
constructor of the Employee class
Name:
Age: 0
ID: 531231

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote