Question: Cod e a program that prompts the user for the size of the amay. Using the size, the program creates several arrays that will store

 Cod e a program that prompts the user for the size
of the amay. Using the size, the program creates several arrays that

Cod e a program that prompts the user for the size of the amay. Using the size, the program creates several arrays that will store information about your favorite sports and teams. There will be one array for the sport, another for the team, and the last one for the year of your team's last championship. The values in each array at the same location are for a given sport. Once the arrays are populated, print the information from each array. The size and input will be the only fields (class variables). Use printf). Code your program according to the specifications below. Use the ooping structure generally associated with array processing. Name the program YourLastNameFirstinitialLE62 java. The methods will be called from the main0 1st Input Prompt Code this in a method named arraySize0. How many sports are you interested in? 2nd Input Prompt In a method named setFavorite Sports declare the sports array and populate it. This method wil return the sports array to the calling statement. The 9 in the prompt below wiw print 1 for the first sport, then 2 for the 2nd one and so forth, Use the loop-control variable as the value for 9 Enter sport #9: 3rd Ingut Prompt In a method named setFavorite Teams declare the teams array and populate it. The Xs in the prompt is the sport. The setFavoriteTeams method wil retun the teams array to the calling statement as well as receive the sports array from the calling statement Enter your favorite Xxxxxxxxx team year array and populate it. The Xs in the prompt is the team name. The setLastChampionship method will return the year array to the calling Lida Shepherd IS 2031-LE 62 statement as weW as receive the team array from the calling statement This method wiW be called as an argument in the call to printSports Teams0. Enter the year of the Xxxxxxxxxxxx' last championship: Output Specifications Where the Xs represent the sport and team and the Zs the year. Code the output print statement in a method named printSports Teams0 that accepts the sports, teams and year arrays. In the printSports Teams method use a for loop to print the information from each array. The print for the header has to be outside of the for loop because r's printed only once. MY SPORTS TEAMS Sport: Xxxxxxxxxxxx Team: Xxxxxxxxxx Last Championship: zzz9 Sport: Xxxxxxxxxxxx Team: Xxxxxxxxxxxx Last Championship: zzz9

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!