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, 23.06.2019 01:50
Create a class named majors that includes an enumeration for the six majors offered by a college as follows: acc, chem, cis, eng, his, phys. display the enumeration values for the user, then prompt the user to enter a major. display the college division in which the major falls. acc and cis are in the business division, chem and phys are in the science division, and eng and his are in the humanities division. save the file as majors.java.
Answers: 2
question
Computers and Technology, 23.06.2019 07:00
To produce a starlight effect in her photograph, lina should choose the filter for her camera.
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
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, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01
question
Mathematics, 21.10.2020 02:01