Question
Java A text file contains the names of the teams that won the Super Bowl from 1967 through 2019. Write a program that repeatedly allows
Java
A text file contains the names of the teams that won the Super Bowl from 1967 through 2019. Write a program that repeatedly allows a user to enter a team name and then displays the number of times and the years in which that team won the Super Bowl. If the team entered by the user has never won the Super Bowl, report that to the user instead. For example, when a user enters Cowboys as the team name, your program should search the list of team names for Cowboys, counting the number of times it was found. Your program should also display each of the years in which the specified team won the Super Bowl. For the Cowboys, the five years in which they won the Super Bowl were 1972, 1978, 1993, 1994, and 1996. Your program should allow the user to continue to make requests until they enter a suitable sentinel value such as the word quit or the letter q in place of a team name. This is an example of possible output: Super Bowl Winners This program will tell you how many times and in which years a football team won the Super Bowl. Enter a name of 'quit' to exit. Enter the team name: Browns The Browns have yet to win the Super Bowl. Enter the team name: Eagles The Eagles won the Super Bowl once in 2018. Enter the team name: Dolphins The Dolphins won the Super Bowl 2 times in 1973, and 1974. Enter the team name: Raiders The Raiders won the Super Bowl 3 times in 1977, 1981, and 1984. Enter the team name: quit Thank you. To receive full credit for this programming assignment, you must: Use the correct file name. Submit a program that executes correctly. Interact effectively with the user. Grading Guideline: Correctly name the file submitted. (5 points) Create a comment containing the students full name. (5 points) Document the program with other meaningful comments. (5 points) Store the team names correctly. (10 points) Store the Super Bowl years correctly. (10 points) Define and use a sentinel value correctly. (5 points) Prompt the user for a football team name. (5 points) Correctly count and display the number of Super Bowl wins. (20 points) Correctly display the year(s) for each Super Bowl win. (20 points) Use proper (different) formatting for year or years. (5 points) Use prompts that were easy to understand. (10 points)
File Team.txt
Packers Packers Jets Chiefs Colts Cowboys Dolphins Dolphins Steelers Steelers Raiders Cowboys Steelers Steelers Raiders 49ers Redskins Raiders 49ers Bears Giants Redskins 49ers 49ers Giants Redskins Cowboys Cowboys 49ers Cowboys Packers Broncos Broncos Rams Ravens Patriots Buccaneers Patriots Patriots Steelers Colts Giants Steelers Saints Packers Giants Ravens Seahawks Patriots Broncos Patriots Eagles Patriots
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started