subject

When starting the program, the user will provide one command line argument. The command line argument will be the name of the file that contains the information about Pokemon. If the user does not provide the name of an existing file the program should print out an error message and quit. Searching and Printing:
Once the program begins, the user should be prompted with a list of different ways to display the Pokedex information. After the user has chosen an option, they should be asked if they want the information printed to the screen or written to a file. If they choose to write to a file, they should be prompted for a file name. If the file name already exists, the information should be appended to the file. If the file name does not exist, a file should be created and the information should be written to the file.
Available Options:
Search by dex number: If the user picks this option the program must search through the available Pokemon for one that matches a user entered number. Once found, it should print/write to file that Pokemon's data. If there is no matching Pokemon, the program must print an error message and give them all of the options again.
Search by name: If the user picks this option the program must search through the available Pokemon for one that matches a user entered name. Once found, it should print/write to file that Pokemon's data. If there is no matching Pokemon, the program must print an error message and give them all of the options again.
Search by type: If the user picks this option the program must search through the available Pokemon for ones that match a user entered type. Once found, it should print/write to file all of the Pokemon that have that type. If there is no Pokemon with the requested type, the program must print an error message and give them all of the options again.
Add new Pokemon: If the user picks this option, the program must prompt the user to enter each of the fields for a new Pokemon. The size of the Pokedex will need to dynamically increase to store the new data.
Quit: The program will exit.
Your program should continue searching and printing/writing until the user chooses to quit.
Required Classes:
The following classes are required in your program. They will help organize the information that will be read in (or derived) from the files. You cannot modify, add, or take away any part of the class.
The Pokedex class will be used to hold information from the dex. txt file. This class holds information about the Pokedex.
class Pokedex {
string trainer;
int num_pokemon;
Pokemon* dex;
};
The Pokemon class will also be used to read in information from the dex. txt file. This class holds information about a Pokemon.
class Pokemon{
int dex_num;
string name;
string type;
string moves[4];
};
Required Input File Format
Your program must accommodate the file formats as specified in this section. The spellbooks. txt file has the following structure. The file information will be provided in sets (corresponding to each spellbook). Each spellbook will be accompanied by a listing of the spells inside.
The dex. txt file will have the following pattern:

etc...

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:30, lilpeepxliltracy
This technology is used to produce high-quality documents that look good on the computer screen and in print.
Answers: 1
image
Computers and Technology, 22.06.2019 20:00, Jana1517
What is the worst-case complexity of the maxrepeats function? assume that the longest string in the names array is at most 25 characters wide (i. e., string comparison can be treated as o( class namecounter { private: int* counts; int nc; string* names; int nn; public: namecounter (int ncounts, int nnames); int maxrepeats() const; }; int namecounter: : maxrepeats () { int maxcount = 0; for (int i = 0; i < nc; ++i) { int count = 1; for (int j = i+1; j < nc; ++j) { if (names[i] == names[j]) ++count; } maxcount = max(count, maxcount); } return maxcount; }
Answers: 3
image
Computers and Technology, 22.06.2019 22:00, bbysl15
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
image
Computers and Technology, 23.06.2019 15:30, jokerr6323
1. ask the user how many questions are in the quiz. 2. ask the user to enter the key (that is, the correct answers). there should be one answer for each question in the quiz, and each answer should be an integer. e. g., 34 7 13 100 81 3 9 10 321 12 might be the key for a 10-question quiz. you will need to store the key in an array. 3. ask the user to enter the answers for the quiz to be graded. there needs to be one answer for each question. note that these answers do not need to be stored; each answer can simply be compared to the key as it is entered. 4. when the user has entered all of the answers to be graded, print the number correct and the percent correct. 5. add a loop so that the user can grade any number of quizzes with a single key. after the results have been printed for each quiz, ask "grade another quiz? (y/n)." note: you only have one array (the key). you are not creating a new key for each set of quiz answers.
Answers: 3
You know the right answer?
When starting the program, the user will provide one command line argument. The command line argumen...

Questions in other subjects:

Konu
Arts, 06.05.2021 19:10