subject

Rewrite your league program from assignment 5 so that it uses dynamic memory allocation (dma) to create the team names and scores arrays. this is a good test of the modularity of your program. you will only need to make slight modifications to your main() function if you wrote your original program using functions similar to the following: void initializedata(string names[], int wins[], int size) void sort(string names[], int wins[], int size) void display(string names[], int wins[], int size) your modified league program should start out by asking the user how many teams will be entered. it should then dynamically allocate two appropriate arrays, and proceed just like the original league assignment, calling the above three functions. when your program is done using the arrays, don't forget to use delete [] to return their memory to the system. note: you must use dynamic memory allocation for your arrays, i. e. the new and delete [] operators, to receive credit. the output from your program should look approximately like this (user input in orange bold): how many teams will you enter? : 4 enter team #1: padres enter the wins for team #1: 75 enter team #2: dodgers enter the wins for team #2: 91 enter team #3: giants enter the wins for team #3: 92 enter team #4: cubs enter the wins for team #4: 65 league standings: giants: 92 dodgers: 91 padres: 75 cubs: 65

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 17:00
Aisha has finished working on a word processing document that contains 15 pages. she has added some special elements in the first three pages, page 9 and 10, and page 15 from the document. she wants to print only these pages to see how they look. which option is the correct way to represent (in the print dialog box) the pages that aisha wants to print
Answers: 3
question
Computers and Technology, 24.06.2019 02:00
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
3. what do the terms multipotentialite, polymath, or scanner mean?
Answers: 2
question
Computers and Technology, 24.06.2019 23:00
Hypertension occurs when blood pressure is too high.
Answers: 1
You know the right answer?
Rewrite your league program from assignment 5 so that it uses dynamic memory allocation (dma) to cre...
Questions
question
Mathematics, 24.03.2021 20:40
question
Mathematics, 24.03.2021 20:40
question
Health, 24.03.2021 20:40
question
Mathematics, 24.03.2021 20:40
question
Spanish, 24.03.2021 20:40
Questions on the website: 13722363