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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education