Question

Using the existing code and files provided, create a driver/menu to run the functions. You may...

Using the existing code and files provided, create a driver/menu to run the functions. You may design your own menu. C++ only. Thanks so much will give good vote

media%2Fafa%2Fafa059a9-a2b7-4da0-a672-a2
media%2F561%2F561ff9a5-ddef-490b-93aa-22
media%2Faa2%2Faa25f52e-c957-4007-a704-f7
media%2F6a6%2F6a6eabad-9b34-42d1-bd0f-37
0 0
Add a comment Improve this question Transcribed image text
Answer #1


//Replace you main method with the given main method
int main() {
string teams[MAX];
int size = 0;
int q1[MAX],q2{MAX],q3[MAX],q4[MAX];

int choice;
bool loopTerminator = true;

cout << "*******************************\n";
cout << "The Menu dislay Two Methods\n";
cout << "if choice Number 1 -- to FillArray to read data from file\n";
cout << "if choice Number 2 -- to PrintArray to print data from file read above\n";
cout << "if choice Number 0 -- to exit the Program Menu\n";
cout << "*******************************\n";

//Loop that terminates only when 0 is choice
while (loopTerminator != false){
cout << "*******************************\n";
cout << " Enter your choice and press return: ";

cin >> choice;

switch (choice)
{
case 1:
//Call fillArray function/method here
FillArray(teams,q1,q2,q3,q4,size);
break;
case 2:
// call printArray method here
PrintArray(teams,q1,q2,q3,q4,size);
break;
case 0:
cout << "End of Program.\n";
loopTerminator = false;
break;
default:
cout << "Not a Valid Choice. \n";
cout << "Choose again.\n";
cin >> choice;
break;
}

}
return 0;
}

Add a comment
Know the answer?
Add Answer to:
Using the existing code and files provided, create a driver/menu to run the functions. You may...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please i need the .H, .cpp and main.cpp files. Please use vector. its for my midterm so correct code that can run only....

    Please i need the .H, .cpp and main.cpp files. Please use vector. its for my midterm so correct code that can run only. Thank you. Pointers and Dynamic Memory – Chapter 11 1. Write code using pointers and the Accounts class from week 1 assignment as follows – create a program in which you a. Create 10 accounts using an array with id’s 0 to 9 and refer to each account using pointer notation b. Add an initial balance of...

  • Please help with this exercises in c++ language Thanks Lab Activity #5-More Functions/FILES Exercise# Write a...

    Please help with this exercises in c++ language Thanks Lab Activity #5-More Functions/FILES Exercise# Write a program that will generate 1000 random numbers (all of which are between 10 and 20) and then write all of the even numbers (from those 1000 numbers) to a new file called "myEvenRandoms.txt Exercise #2 (DO ONLY IF WE COVERED ARRAYS OF CHARACT Write a program that will ask the user to enter a sentence. Then create a separate function that will count the...

  • In C++ please! Please include .cpp and .hpp files! Thank you! Recursive Functions Goals Create and...

    In C++ please! Please include .cpp and .hpp files! Thank you! Recursive Functions Goals Create and use recursive functions In this lab, we will write a program that uses three recursive functions. Requirements: Important: You must use the array for this lab, no vectors allowed. First Recursive Function Write a function that recursively prints a string in reverse. The function has ONLY one parameter of type string. It prints the reversed character to the screen followed by a newline character....

  • For this assignment you are to create a button-controlled flying saucer program. You may run an...

    For this assignment you are to create a button-controlled flying saucer program. You may run an example of the program here: The driver and DisplayWindow which you may not alter are provided here: /JavaCS1/src/explodingsaucer/SaucerDriver.java /JavaCS1/src/explodingsaucer/DisplayWindow.java Note that it makes use of the DisplayWindow class that figures prominently in Chapter 12 of the textbook. For this assignment you need only submit a single file, SaucerPanel.java (must be so named), which extends JPanel in the standard way, and which carries out the...

  • In this lab, using C++, you will create an abstract data type, using a doubly-linked circular...

    In this lab, using C++, you will create an abstract data type, using a doubly-linked circular structure to store the values and links. You must create it by your own and not use any existing containers. You will need a QueueNode. You can use a struct for this, as each node will not have any associated functions. It will have members for data, and the next and previous pointers. Data will be positive integers. There will be no NULL pointers....

  • Please design, write the code and create the requisite submission files in C++ for the following...

    Please design, write the code and create the requisite submission files in C++ for the following problem: A menu-driven program that offers the user 5 options as follows: Menu: 1. Display array 2. Add up all elements in the array and display that number. 3. Add 1 to each element in the array. 4. Swap the values in row one with the values in row three. 5. Exit In main(), declare and initialize a 2-dimensional array that contains 5 x...

  • % PA 08: 3D Plots, Files, Functions % Using the script provided and the functions provided,...

    % PA 08: 3D Plots, Files, Functions % Using the script provided and the functions provided, complete the code % to be able to plot specified graphs. Script file contains a menu of % choices where user will select which plot to produce. % Functions contain the necessary code to plot. Please note that functions % do NOT take any arguments and do NOT return anything. % You are provided with two MS Excel files that you must use to...

  • in java : Create Java Application you are to create a project using our designated IDE...

    in java : Create Java Application you are to create a project using our designated IDE (which you must download to your laptop). Create the code to fulfill the requirements below. Demonstrate as stipulated below. Create a Main Application Class called AddressBookApplication (a counsole application / command line application). It should Contain a Class called Menu that contains the following methods which print out to standard output a corresponding prompt asking for related information which will be used to update...

  • This assignment uses functions, files, and strings. Enough flexibility is provided for you to apply your...

    This assignment uses functions, files, and strings. Enough flexibility is provided for you to apply your knowledge of basic C++ programing to develop your solution. Develop a functional flowchart and then write a C++ program to solve the following problem. 1. Create a text file named file1.txt and write your brand of car (like Honda, Toyota, etc) in the file. You will be reading the name of the file from the keyboard as a string, using the string class. Your...

  • LAB 13 Please use correct division of code into .h and .cpp files and Comments in...

    LAB 13 Please use correct division of code into .h and .cpp files and Comments in code explain what's being done. Thanks you very much for your help Create an STL vector of 10 integers and store initial values (0 to 9 is fine). Use the std::random_shuffle algorithm to shuffle the list. Print the list. (use an iterator in a regular for loop) Use the std::sort algorithm to sort the list. Print the list again. (use a range-based for loop)...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT