Question
THIS IS A C++ QUESTION We Do Not Namespace Std File needed: Fortnite.txt - Click and then save the file that opens in a new
THIS IS A C++ QUESTION We Do Not Namespace Std
File needed:
Fortnite.txt - Click and then save the file that opens in a new window. Place file in the cmake-build-debug folder for your project in CLion.
Instructions:
Fortnite has been one of the most popular online games during the past couple of years. You will write a program that lets the user learn a few things about the Top 100 Fortnite players in the world (with respect to money earned in tournaments).
The program will first display an intro message. It will then read data from a file called fortnite.txt into two arrays: One for the players ID (gaming nickname) and the other for his/her earnings. Yes, these are parallel arrays. Lastly, it will keep displaying a menu with choices until the user selects the option that exits the program.
The eight functions you need:
1. Print the introduction / welcome message
2. Read data from the .txt file into your two arrays
3. Print the menu with the four choices. Output only. Input is in main().
4. Print information about the top player and the bottom player in the Top 100.
5. Calculate and output the total winnings and the average winnings of all 100 players
6. Binary Search algorithm, adjusted for strings
7. Bubble Sort algorithm, adjusted for strings
8. Swap function, which supports the Bubble Sort function
Based on the functions above and the output below, you should figure out what goes in main(). One last thing: Add a single line of code (in main) that makes all output have two decimal places.
Output:
This program will help you get information about the Top 100 Fortnite Players
The data was compiled from 366 tournaments. Range: 2/27/2018 - 7/16/2019
Player rank is based on total winnings from these tournaments
Source: https://www.esportsearnings.com/games/534-fortnite/top-players
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 1
The first player in the Top 100 list is: Bizzle
The total winnings for this player: $516750.00
The last player in the Top 100 list is: Powder
The total winnings for this player: $46700.50
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 2
Total winnings of all Top 100 players is: $12203284.01
Average winnings of Top 100 players is: $122032.84
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 3
Enter the Player ID you wish to search for: Vinny
That player is in the Top 100!
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 3
Enter the Player ID you wish to search for: Maria
That player is NOT in the Top 100
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 5
That is an incorrect choice. Please try again.
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 4
Hope you enjoyed this program!
Fortnite.txt
File needed:
Fortnite.txt - Click and then save the file that opens in a new window. Place file in the cmake-build-debug folder for your project in CLion.
Instructions:
Fortnite has been one of the most popular online games during the past couple of years. You will write a program that lets the user learn a few things about the Top 100 Fortnite players in the world (with respect to money earned in tournaments).
The program will first display an intro message. It will then read data from a file called fortnite.txt into two arrays: One for the players ID (gaming nickname) and the other for his/her earnings. Yes, these are parallel arrays. Lastly, it will keep displaying a menu with choices until the user selects the option that exits the program.
The eight functions you need:
1. Print the introduction / welcome message
2. Read data from the .txt file into your two arrays
3. Print the menu with the four choices. Output only. Input is in main().
4. Print information about the top player and the bottom player in the Top 100.
5. Calculate and output the total winnings and the average winnings of all 100 players
6. Binary Search algorithm, adjusted for strings
7. Bubble Sort algorithm, adjusted for strings
8. Swap function, which supports the Bubble Sort function
Based on the functions above and the output below, you should figure out what goes in main(). One last thing: Add a single line of code (in main) that makes all output have two decimal places.
Output:
This program will help you get information about the Top 100 Fortnite Players
The data was compiled from 366 tournaments. Range: 2/27/2018 - 7/16/2019
Player rank is based on total winnings from these tournaments
Source: https://www.esportsearnings.com/games/534-fortnite/top-players
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 1
The first player in the Top 100 list is: Bizzle
The total winnings for this player: $516750.00
The last player in the Top 100 list is: Powder
The total winnings for this player: $46700.50
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 2
Total winnings of all Top 100 players is: $12203284.01
Average winnings of Top 100 players is: $122032.84
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 3
Enter the Player ID you wish to search for: Vinny
That player is in the Top 100!
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 3
Enter the Player ID you wish to search for: Maria
That player is NOT in the Top 100
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 5
That is an incorrect choice. Please try again.
Enter the number from the choices below:
(1) Show the #1 and #100 player + winnings
(2) Show Total and Average winnings
(3) Find a player in Top 100 by ID
(4) EXIT THIS PROGRAM
Enter your choice: 4
Hope you enjoyed this program!
Fortnite.txt
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