Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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.
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started