The Cullerton Park District holds a mini-Olympics each summer. Create a class named Participant with fields for

Question:

The Cullerton Park District holds a mini-Olympics each summer. Create a class named Participant with fields for a name, age, and street address. Include a constructor that assigns parameter values to each field and a toString() method that returns a String containing all the values. Also include an equals() method that determines two Participants are equal if they have the same values in all three fields.

Create an application with two arrays of at least eight Participants each—one holds Participants in the mini-marathon, and the other holds Participants in the diving competition. Prompt the user for participant values. After the data values are entered, display values for Participants who are in both events. Save the files as Participant.java and TwoEventParticipants.java.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: