Create a project and class named Project3 in BlueJ. • Download the files "names.txt" and "wins.txt" and store it in your project folder. • Declare a two-dimensional (2D) String array with 10 rows and 2 columns. This array will be for the first and last names of each coach. • Declare a two-dimensional (2D) integer array with 10 rows and 2 columns. This array will be for the number of career wins and Stanley Cup championships of each coach. • Declare two Scanner objects, one associated with the names.txt file and the other associated with the wins.txt file. • Call the following methods: setNamesArray() - This method has two integer parameters (one for the rows of a two-dimensional array and the other for the columns of a two-dimensional array) and a Scanner parameter. The method will return a two-dimensional array of Strings with rows and columns given by the parameters. Each row of the array will have each coach’s first name in the first column and each coach’s last name in the second column. Any loops used must have an actual Boolean expression involving a relational operator (<, >, <=, >=, etc) and using either the “.length” feature or the integer parameters. setWinsArray() - This method has two integer parameters (one for the rows of a two-dimensional array and the other for the columns of a two-dimensional array) and a Scanner parameter. The method will return a two-dimensional array of integers with rows and columns given by the parameters. Each row of the array will have each coach’s career wins in the first column and each coach’s Stanley Cup championships in the second column. Any loops used must have an actual Boolean expression involving a relational operator (<, >, <=, >=, etc) and using either the “.length” feature or the integer parameters. mostCups() - This method returns a String and has two parameters: a two-dimensional array of Strings and a two-dimensional array of integers. The method will find the row index of the largest number of Stanley Cups in the array for wins and use this index to return a String containing the coach with the Stanley Cups and the number of Stanley Cups in a sentence. The “.length” feature must be used in an expression involving a relational operator in any loop conditions in this method. noCupsForYou() - This method is void and has two parameters: a two-dimensional array of Strings and a twodimensional array of integers. The method first display a header for the coaches who have not won the Stanley Cup. It will find all coaches who have not won the Stanley Cup and display their first and last names. The “.length” feature must be used in an expression involving a relational operator in any loop conditions in this method.

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter10: Application Development
Section: Chapter Questions
Problem 9VE
icon
Related questions
Question
100%

Here are the programming instructions for this project:
• Create a project and class named Project3 in BlueJ.
• Download the files "names.txt" and "wins.txt" and store it in your project folder.

• Declare a two-dimensional (2D) String array with 10 rows and 2 columns. This array will be for the first and last names of each coach.
• Declare a two-dimensional (2D) integer array with 10 rows and 2 columns. This array will be for the number of career wins and Stanley Cup championships of each coach.
• Declare two Scanner objects, one associated with the names.txt file and the other associated with the wins.txt file.
• Call the following methods:

  • setNamesArray() - This method has two integer parameters (one for the rows of a two-dimensional array and the other for the columns of a two-dimensional array) and a Scanner parameter. The method will return a two-dimensional array of Strings with rows and columns given by the parameters. Each row of the array will have each coach’s first name in the first column and each coach’s last name in the second column. Any loops used must have an actual Boolean expression involving a relational operator (<, >, <=, >=, etc) and using either the “.length” feature or the integer parameters.
  • setWinsArray() - This method has two integer parameters (one for the rows of a two-dimensional array and the other for the columns of a two-dimensional array) and a Scanner parameter. The method will return a two-dimensional array of integers with rows and columns given by the parameters. Each row of the array will have each coach’s career wins in the first column and each coach’s Stanley Cup championships in the second column. Any loops used must have an actual Boolean expression involving a relational operator (<, >, <=, >=, etc) and using either the “.length” feature or the integer parameters.
  • mostCups() - This method returns a String and has two parameters: a two-dimensional array of Strings and a two-dimensional array of integers. The method will find the row index of the largest number of Stanley Cups in the array for wins and use this index to return a String containing the coach with the Stanley Cups and the number of Stanley Cups in a sentence. The “.length” feature must be used in an expression involving a relational operator in any loop conditions in this method.
  • noCupsForYou() - This method is void and has two parameters: a two-dimensional array of Strings and a twodimensional array of integers. The method first display a header for the coaches who have not won the Stanley Cup. It will find all coaches who have not won the Stanley Cup and display their first and last names. The “.length” feature must be used in an expression involving a relational operator in any loop conditions in this method.
  • Here is a sample output:

Scotty Bowman has the most career wins with 1244

 

Scotty Bowman has the most Stanley Cups with 9

 

The following coaches have not won the Stanely Cup:

Paul Maurice

Pat Quinn

Lindy Ruff

wins.txt - Notepad
File Edit Format View Help
782 4
1244 9
834 1
692 4
672 1
675 0
890 3
684 0
736 0
785 1
Ln 1, Col 1
100% Windows (CRLF)
UTF-8
] X
Transcribed Image Text:wins.txt - Notepad File Edit Format View Help 782 4 1244 9 834 1 692 4 672 1 675 0 890 3 684 0 736 0 785 1 Ln 1, Col 1 100% Windows (CRLF) UTF-8 ] X
names.txt - Notepad
File Edit Format View Help
Al Arbor
Scotty Bowman
Ken Hitchcock
Dick Irvin
Mike Keenan
Paul Maurice
Joel Quenneville
Pat Quinn
Lindy Ruff
Barry Trotz
Ln 1, Col 1
100% Windows (CRLF)
UTF-8
X
Transcribed Image Text:names.txt - Notepad File Edit Format View Help Al Arbor Scotty Bowman Ken Hitchcock Dick Irvin Mike Keenan Paul Maurice Joel Quenneville Pat Quinn Lindy Ruff Barry Trotz Ln 1, Col 1 100% Windows (CRLF) UTF-8 X
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning