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.
Step by Step Answer:
Participant public class Participant private String name private int age private String address publ...View the full answer
Students also viewed these Computer science questions
-
In this assignment, you are required to implement a class MyArray as defined below, to store an array of integers (int). Many of its methods will be implemented using the principle of recursion....
-
Create a TaxReturn class with fields that hold a taxpayers Social Security number, last name, first name, street address, city, state, zip code, annual income, marital status, and tax liability....
-
a. You have created several classes for Carlys Catering. Now, create a new abstract class named Employee. The class contains data fields for an employees ID number, last name, first name, pay rate,...
-
Use the following table, Present Value of an Annuity of 1 Period 8% 9% 10% 1 0.926 0.917 0.909 2 1.783 1.759 1.736 3 2.577 2.531 2.487 A company has a minimum required rate of return of 9 %. It is...
-
Do the following: a. Find the indicated binomial probability using Table A-l in Appendix A. If np 5 and nq 5, also estimate the indicated probability by using the normal distribution as an...
-
9-1. La segmentacin del mercado consiste en agrupar a los clientes potenciales en segmentos que poseen dos caractersticas claras. Cules son?
-
eI2.12. Afirmcanhavea hightrailing PIE ratio,yethaveanexpected cum-dividend earningsgrowth rateaftertheforward yearthat is lessthantherequired rate.Is thisso?
-
For the given loading, determine the zero-force members in the truss shown.
-
The constitution of Rosewood Ltd requires approval of final dividends by shareholders at the Annual General Meeting before these can be declared or paid. Rosewood Ltd has a 30 June year end. What is...
-
The Ortega Food Company needs to ship 100 cases of hot tamales from its warehouse in San Diego to a distributor in New York City at minimum cost. The costs associated with shipping 100 cases between...
-
Which of the following choices is the best example of a parent class/child class relationship? a. Rose/Flower b. Present/Gift c. Dog/Poodle d. Sparrow/Bird
-
Create a Building class and two subclasses, House and School. The Building class contains fields for square footage and stories. The House class contains additional fields for number of bedrooms and...
-
An aqueous solution has a pH of 3.75. What is the hydronium ion concentration of the solution? Is it acidic or basic?
-
A parent acquires all of the stock of a subsidiary for $40 million in cash. The subsidiarys books report the following account balances at the date of acquisition (in trial balance format)....
-
1. Given: The sign for the Inn of the Prancing Pony in Bree-yes, it comes in pints-is fixed on the end of a beam of length 5L. If the sigh deflects too much then Gandalf will hit his head when he...
-
Q21) Add positive and negative charges as shown in the diagram below. Use the arrows of the simulation to guide you in drawing continuous electric field lines around and in between the three charges....
-
When 10.1 g CaO is dropped into a styrofoam coffee cup containing 157 g H2O at 18.0C, the temperature rises to 35.8C. Calculate the enthalpy change of the following reaction in kJ/mol CaO. Assume...
-
4-12. Sometimes heterogeneous chemical reactions take place at the walls of tubes in which reactive mixtures are flowing. If species A is being consumed at a tube wall because of a chemical reaction,...
-
Determine m, i, and n for the following. 11.5% compounded semi-annually for 13.5 years
-
Describe a group you belong or have belonged discuss the stages of group development and suggest how to improve the group effectiveness by using the group development model.
-
a. Create a class named Lease with fields that hold an apartment tenants name, apartment number, monthly rent amount, and term of the lease in months. Include a constructor that initializes the name...
-
In each case, determine and fix the problem. After you correct the errors, save each file using the same filename preceded with Fix. For example, DebugThree1.java will become FixDebugThree1.java. a....
-
Playing cards are used in many computer games, including versions of such classics as solitaire, hearts, and poker. Design a Card class that contains a character data field to hold a suit (s for...
-
Famas Llamas has a weighted average cost of capital of 8.8 percent. The companys cost of equity is 12 percent, and its pretax cost of debt is 6.8 percent. The tax rate is 22 percent. What is the...
-
The common stock of a company paid 1.32 in dividens last year. Dividens are expected to gros at an 8 percent annual rate for an indefinite number of years. A) If the company's current market price is...
-
(1 point) Bill makes annual deposits of $1900 to an an IRA earning 5% compounded annually for 14 years. At the end of the 14 years Bil retires. a) What was the value of his IRA at the end of 14...
Study smarter with the SolutionInn App