Question: 1 . OOP - Write program that will read this file: football.txt Download football.txt This file has a header, a football player's name and a

1. OOP -Write program that will read this file: football.txt Download football.txt
This file has a header, a football player's name and a number of total passing yards.
The class definition:
Football Class
You may want to create an array for each attribute.
Attributes: Football player
Total passing yards
This class will have a default constructor, overloaded constructor, getters and setters, and a toString method.
Football Driver:
Initialize an array. Assume you know the exact number of records in that array ( You will have to count the number of football players for this).
Read past the first record header
Read two records, one for player and one for yards
Create an object
Fill up the array and print the array
Have a menu option to choose which one to do.
These methods could go in main or the class definition, you choose.
Menu
Option 1: Highest Passing Yards
Option 2: Lowest Passing Yards
Option 3: Average Passing Yards
Option 4: Quit
Determine the highest football passing yards. You will need to find the largest number in the data file - chapter 4 describes how to do this. Display the highest yards and the player's name.
Determine the lowest football passing yards . You will need to find the smallest number in the data file - chapter 4 describes how to do this. Display the lowest yards and the player's name.
Determine the average of all of the passing yards.
THE FILE:
Player Most Passing yards
Tom Brady
80560
Drew Brees
80358
Peyton Manning
71940
Brett Favre
71838
Phillip Rivers
63440
Ben Roethlisberger
61381
Dan Marino
61361
Eli Manning
57023
Matt Ryan
56757
Aaron Rogers
54142

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 Programming Questions!