Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help with C++ problem: Need main.cpp, Boardgame.cpp, Executive.cpp, Boardgame.h, Executive.h files. Thank You The file is a text file which lists in order the

Need help with C++ problem: Need main.cpp, Boardgame.cpp, Executive.cpp, Boardgame.h, Executive.h files. Thank You

The file is a text file which lists in order the boardgame name , gibbons rating, peoples rating, the year it was published, the minimum players required and the minimum play time. Once the file is read in the user is going to be presented with a menu to choose from: option 1 will allow the user to see in order of the text file all of the boardgame names, option 2 the user will enter a year and all the games from that year will be printed, if invalid year it will say no games found. All of the options are listed below. Main.cpp is already included below.

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

File format At the top of the file is the number of games in the list. Each game has the following format All data here has been provided by Board Game Geek NOTES: . | modified the names to help you read them in easier (spaces replaced with underscores and all names are lowercase) All ratings are between 0 and 10 Some aren't standalone games, but are expansions, you don't have to worry about distinguishing them Sample layout from the file 10 187 10_minute_heist: _the_wizard's_tower 5.87996 2017 2 1st & goal 7.5 6.05092 2011 120 7_wonders_duel 8 7 .97935 2015 2 30 adventure_time_love_letter 6.5 6.34634 2015 2 20 arkham_horror:_the_card_game 9.5 7.91684 2016 1 arkham_horror:_the_card_game_-_return_to_the_night_of_the_zealot arkham_horror:_the_card_game_-_the_dunwich_legacy:_expansion 7 arkham_horror:_the_card_game_-_the_forgotten_age: _expansion 8 arkham_horror:_the_card_game_-_the_path_to_carcosa: _expansion 9 bang!_the_dice_game 7.5 6.83613 20133 1 5 1 60 5.96254 2018 7.22218 2017 6.09412 2018 1 6.70514 2017 1 Reading the file should a fairly easy task for you. I imagine you'll put something like this in a loop: myInfileObject >> tempName >> tempGibbRating >> tempPubRating >> tempYear >> tempMinPlayers >> tempMinTime; User Interactions The user will launch your program and pass in the file name containing the player data from the command line (recall argv and argc). Once the file is read in, provide the user with a menu in order to do the following: Name (year) [GR=gibbons-rating, PR=public-rating, MP=min-players, MT=min-playtime] For example: 10_minute_heist: _the_wizard's_tower (2017) [GR=6, PR=5.87996, MP=2, MT=10] 1st_&_goal (2011) [GR=7.5, PR=6.05092, MP=2, MT=120] User's Menu 1. Print all games (same order as from file) 2. Print all games from year Obtain a year from the user and either print all the games from that year or print "No games found" 3. Print a ranking range Obtain a ranking range (e.g. 1 - 10) from the user and print all in that ranking range (Gibbons rating) 4. The People VS Dr. Gibbons . The goal of this is see where Dr. Gibbons and the people disagree Obtain a number (0-10, decimals allowed) from the user and print all games where the people's rating and Dr. Gibbons rating are separated by that much or more Example, if the user wanted to see all games where the people's rating and Dr. Gibbons' rating differed by more than 1.5, they would enter 1.5 at the prompt then you see games like Pandemic listed NOTE: This option doesn't care which rating is higher, it just prints games where ratings differ by a threshold set by the user 5. Find a game to play Obtain a min player count and min playtime from the the user Print all games that support at least that number of players and required at least that much time to play 6. Exit the program main.cpp Main will be in charge of very little. It will include the needed files, but as soon as possible it will hand control over to the the Executive class. You main can verify the proper number of command line parameter, but after that it should give control to the Executive class. int main(int argc, char* argv[]). if(argc All data here has been provided by Board Game Geek NOTES: . | modified the names to help you read them in easier (spaces replaced with underscores and all names are lowercase) All ratings are between 0 and 10 Some aren't standalone games, but are expansions, you don't have to worry about distinguishing them Sample layout from the file 10 187 10_minute_heist: _the_wizard's_tower 5.87996 2017 2 1st & goal 7.5 6.05092 2011 120 7_wonders_duel 8 7 .97935 2015 2 30 adventure_time_love_letter 6.5 6.34634 2015 2 20 arkham_horror:_the_card_game 9.5 7.91684 2016 1 arkham_horror:_the_card_game_-_return_to_the_night_of_the_zealot arkham_horror:_the_card_game_-_the_dunwich_legacy:_expansion 7 arkham_horror:_the_card_game_-_the_forgotten_age: _expansion 8 arkham_horror:_the_card_game_-_the_path_to_carcosa: _expansion 9 bang!_the_dice_game 7.5 6.83613 20133 1 5 1 60 5.96254 2018 7.22218 2017 6.09412 2018 1 6.70514 2017 1 Reading the file should a fairly easy task for you. I imagine you'll put something like this in a loop: myInfileObject >> tempName >> tempGibbRating >> tempPubRating >> tempYear >> tempMinPlayers >> tempMinTime; User Interactions The user will launch your program and pass in the file name containing the player data from the command line (recall argv and argc). Once the file is read in, provide the user with a menu in order to do the following: Name (year) [GR=gibbons-rating, PR=public-rating, MP=min-players, MT=min-playtime] For example: 10_minute_heist: _the_wizard's_tower (2017) [GR=6, PR=5.87996, MP=2, MT=10] 1st_&_goal (2011) [GR=7.5, PR=6.05092, MP=2, MT=120] User's Menu 1. Print all games (same order as from file) 2. Print all games from year Obtain a year from the user and either print all the games from that year or print "No games found" 3. Print a ranking range Obtain a ranking range (e.g. 1 - 10) from the user and print all in that ranking range (Gibbons rating) 4. The People VS Dr. Gibbons . The goal of this is see where Dr. Gibbons and the people disagree Obtain a number (0-10, decimals allowed) from the user and print all games where the people's rating and Dr. Gibbons rating are separated by that much or more Example, if the user wanted to see all games where the people's rating and Dr. Gibbons' rating differed by more than 1.5, they would enter 1.5 at the prompt then you see games like Pandemic listed NOTE: This option doesn't care which rating is higher, it just prints games where ratings differ by a threshold set by the user 5. Find a game to play Obtain a min player count and min playtime from the the user Print all games that support at least that number of players and required at least that much time to play 6. Exit the program main.cpp Main will be in charge of very little. It will include the needed files, but as soon as possible it will hand control over to the the Executive class. You main can verify the proper number of command line parameter, but after that it should give control to the Executive class. int main(int argc, char* argv[]). if(argc

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

Students also viewed these Databases questions

Question

=+a. Can the reader find the most important message?

Answered: 1 week ago