Logo

Create a class named college with instance variables cname and crank. Add a method named setCollege with parameters name and rank. Add another method…

bitm Object Oriented Programming in Java · 2024 · Solved Question with Answer

Create a class named college with instance variables cname and crank. Add a method named setCollege with parameters name and rank. Add another method named showRecord to display values of these variables. Now derive a class named student with member variables name and roll. Also add two methods setStudent and displayRecord to set parameters and to display records respectively in student. Now in main (), declare 4 objects of student and display the records of student whose name ends with “ra”.

Solution

Please login to view the answer.