Question: With the use of Java code fragments, implement the following features of object-oriented paradigm: (i) Inheritance (5 marks) (ii) Polymorphism (5 marks) (iii) A class

With the use of Java code fragments, implement the following features of object-oriented paradigm: (i) Inheritance (5 marks) (ii) Polymorphism (5 marks) (iii) A class to hold student details and calculate student marks. (5 marks) (iv) A statement to instantiate TWO objects of the class defined in Question 2 (iii) above and initiate them with appropriate values. (5 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

i Inheritance Base classclass Person protected String name protected int age public PersonString name int age thisname name thisage age public void di... View full answer

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 Programming Questions!