Write a program that declares a struct to store the data of a football player (player’s name, player’s position, number of touchdowns, number of catches, number of passing yards, number of receiving yards, and the number of rushing yards). Declare an array of 10 components to store the data of 10 football players. Your program must contain a function to input data and a function to output data. Add functions to search the array to find the index of a specific player, and update the data of a player. (You may assume that input data is stored in a file. Listed below.) Before the program terminates, give the user the option to save data in a file. Your program should be menu driven, giving the user various choices.
Use the following input file to initialize your array of 10 players: [url removed, login to view]
Bill Quarter_Back 70 0 8754 0 573
Jackson Receiver 55 87 50 5490 574
Grahm Running_Back 45 30 0 50 2800
McCoy Full_Back 25 10 0 25 3762
Daryl Quarter_Back 50 2 7560 0 450
Santiago Left_Tackle 5 0 0 0 0
Hanks Receiver 35 37 0 3590 876
Johnson Running_Back 25 80 0 100 4000
Miller Receiver 110 250 150 7867 2100
Ruth Quarter_Back 85 0 12901 0 3249
All of this is done in a single main .cpp file which is to be submitted.
Modify your code in Program 1 to replace your "struct" object with a "class" object.
Submit the following 3 files:
- main cpp file (.cpp)
- class header file (.h)
- class implementation file (.cpp)
Modify your code in Program 2 to include a derived "class" object of your choice.
For example, you may create a derived class called "collegePlayer" or "nflPlayer" or "highSchoolPlayer" that inherits members from your class that you created in Programming Exercise Chapter 10. Feel free to include additional data variable(s) and function(s) in your derived class.
Submit the following 5 files:
- main cpp file (.cpp)
- base class header file (.h)
- base class implementation file (.cpp)
- derived class header file (.h)
- derived class implementation file (.cpp)
31 freelancers estão ofertando em média $43 para esse trabalho
hi. i have a lot of experience in C++ programming. i am sure that i can do your project. we can have a chat about it. thanks Relevant Skills and Experience C++ Proposed Milestones $80 USD - all
Let's start your task Relevant Skills and Experience I’m Windows kernel and user mode expert with more than 15 year experience in C/C++/C#. Proposed Milestones $35 USD - Complete task
I am Pang, web and app developer.I am interesting in your task. I will give you comfortable and cheap service and finish your task on time. Please give a chance!!! Stay tuned, I'm still working on this proposal.
Hi! I've written C++ code for almost 10 yrs and can get this done for you. Let's talk! Relevant Skills and Experience C++ C Proposed Milestones $35 USD - Final