Question: I am having trouble with this question. in java Example Output Basketball Athletes Name: Ray Age: 24 Team: Blue Jays Football Athletes Name: Damon Age:

I am having trouble with this question. I am having trouble with this question. in java Example Output Basketball
in java

Example Output Basketball Athletes Name: Ray Age: 24 Team: Blue Jays Football Athletes Name: Damon Age: 29 Team: Knicks Basketball Athletes Name: Ray Age: 311 Teard. Blue Jays Football Athletes Name: Damon Age: 29. Team: Knicks Sorting Athletes Name: Damon Age: 29 Team: Knicks Athletes Name: Ray Age: 24 Team: Blue Jays Athletes Name: Ray Age: 25. Team: Blue Jays Athletes Name: Damon Age: 28 Team: Knicks GIVEN CODE package Sport import java.util.Arrays: public class Test private static void display(Person personal for (Person person persons) (System.out.println(person); Public static void main(String[] args) personf) persons = new Person[4]; persons[0] = new BasketballAthlete("Ray", 24, "Blue Jays"); persons[1] = new FootballAthlete("Damon", 29, "Knicks"); persons[2] = new BasketballAthlete("Flee". 22. "Titans"); persons[3] = new FootballAthlete("Rocko", 33, "Blasters"); display(persons): Arrays sort persons): System.out.printn("After sorting ....n"); display(persons): // You can start with the code given. You don't need print Profile methods. You have to override toString0 methods in both Basketball Athlete and Football Athlete, Your Person class should implement the comapreTo0 method of comparable interface

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!