Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE WRITE CODE IN C++ . The original program is below.. PROBLEM: Original 9-19 Program is below: Homework IXA COMSC-044 Program 9-19 uses a selection

PLEASE WRITE CODE IN C++ . The original program is below..

PROBLEM:

image text in transcribed

Original 9-19 Program is below:

image text in transcribed

Homework IXA COMSC-044 Program 9-19 uses a selection sort in order to sort the array of pointers. Your assignment is to rewrite the selection sort in Program 9-19 so that it is a Bubble Sort which sorts the array of pointers. Call this new function, which will replace arrSelectionSort(int [1, by the name: arrBubbleSort(int [], int). But otherwise, do not change anything in the rest of the program Call your program: YourName-HwrklXA.cpp Homework IXB COMSC-044 Using Program 9-19, once again, make changes to it so that it is able to handle strings and so is able to sort the words of a Poem in alphabetical order. What you will do is to replace the array: int donations[NUM-DONATIONS] (5, 100, 5, 25, 10 5, 25, 5, 5, 100, 10, 15, 10, 5, 10 ); With the array: string donations(NUM. DONATIONS] = { "The", "Woods", "Are", "Lovely", "Dark", "And", "Deep", "But", "I", "Have", "Promises", "To", "Keep", "Robert", "Frost" y; Then you will make whatever additional changes are necessary to that program so that it is able to do this sort of pointers to strings, instead of pointers to int. You may use either the selection sort in program 9-19, or the Bubble Sort that you wrote for Homework IXA. Make one more change to the output of the program. Where the original program printed the two lines The donations, sorted in ascending order are: The donations, in their original order are . . Replace these lines with the words: . The words, sorted in ascending order are The words, in their original order are: Call your program: YourName-HwrklXB.cpp

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

Were they made on a timely basis?

Answered: 1 week ago

Question

Did the decisions need to be made, or had they already been made?

Answered: 1 week ago