Programming and Logic
Tennis Player Array Assignment
Create a program called TennisWinArray.java.
In the main method
- Ask the user for the name of a tennis player
- Ask the user for the number of years the tennis player has played competitive tennis. Use this value as the size of an int array.
- Ask the user for the year the tennis player began playing competitive tennis
- In a for loop, ask the user to enter the number of wins starting from the first year of play and store the value in the array. The element at index 0 will store the number of wins for the player's first year.
- Call the method printWins with the player's name, the first year of play and the array
In the printWins method
- There should be three parameters: a String for the player's name,int for the first year of play, and an int array
- Display the player's name
- Display the year and the number of wins for each year.