Java assignment

Anonymous
timer Asked: Nov 10th, 2016

Question description

Write a Java program with concepts that meets the following requirements:-

The Orlando Park District holds a mini-Olympics each summer. Create a class named Contestants with fields for a name, age, and street address. Include code to check that the age of the contestant cannot be over 18 and under 14 and if invalid make the user enter a new age. 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 Contestants are equal if they have the same values in all three fields. Create a child class called Event that has a field for eventType and a message containing the type of event. Create an application with two arrays of at least eight Contestants each—one holds Contestants in the 100 meter dash, and the other holds Contestants in the high-jump competition. Prompt the user for contestant values, only allow the two types of events. After the data values are entered, display all values for Participants who are in both events. Save the files as Contestant.java, Event.java and TwoEventParticipants.java

At the beginning of the program add comments as in prior assignments, and don’t forget the program description.

Purpose:

Create a java program from detailed directions.

Ability to:

Follow established programming conventions for writing java programs

Able to create classes using inheritance

Able to create a an array with data

Able to compare elements in the array

Able to write IF statements

Able to write a Loop statements

Able to separate the code into logical methods

Use the print statement for output

Take pictures of your code, output and zip along with your 3 .java files in the Assignment 4 folder under "Assignments".

COP 2800, Java Programming, fall B 2016 Due date: Nov 20th, 2016 midnight (11:59pm). Assignment 4 (10 points): Write a Java program with concepts used through chapter 11 and meets the following requirements:The Orlando Park District holds a mini-Olympics each summer. Create a class named Contestants with fields for a name, age, and street address. Include code to check that the age of the contestant cannot be over 18 and under 14 and if invalid make the user enter a new age. 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 Contestants are equal if they have the same values in all three fields. Create a child class called Event that has a field for eventType and a message containing the type of event. Create an application with two arrays of at least eight Contestants each— one holds Contestants in the 100 meter dash, and the other holds Contestants in the high-jump competition. Prompt the user for contestant values, only allow the two types of events. After the data values are entered, display all values for Participants who are in both events. Save the files as Contestant.java, Event.java and TwoEventParticipants.java At the beginning of the program add comments as in prior assignments, and don’t forget the program description. Purpose: Create a java program from detailed directions. Ability to: Follow established programming conventions for writing java programs Able to create classes using inheritance Able to create a an array with data Able to compare elements in the array Able to write IF statements Able to write a Loop statements Able to separate the code into logical methods Use the print statement for output Take pictures of your code, output and zip along with your 3 .java files in the Assignment 4 folder under “Assignments”.
Studypool has helped 1,244,100 students
flag Report DMCA
Similar Questions
Hot Questions
Related Tags
Study Guides

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors