Write program in C++ using strings in conjuction with 2D arrays. Allow the user to enter the names of several local businesses. Sort the business names and display the results. Continue this process until the user is out of business names. Please use good functional decomposition to make your development easier. (Perhaps one function for sorting an array of strings, another function for swapping two strings, one for displaying an array of strings, and others to maintain the user interface. This is also a good place to use a library, btw.) Example Run As an example the program interaction might look something like (the parts in parentheses are typed by the user): $ ./busisort.out Welcome to the Business Sorting Program!!! Please enter the name of a business: (WalMart) Your business is: WalMart Another business? (y) Please enter the name of a business: (JC Penney) Your businesses are: JC Penney WalMart Another business? (Y) Please enter the name of a business: (Merlin Muffler) Your businesses are: JC Penney Merlin Muffler WalMart Another business? (yes) Please enter the name of a business: (Appleby's) Your businesses are: Appleby's JC Penney Merlin Muffler WalMart Another business? (Yes) Please enter the name of a business: (Zippy's) Your businesses are: Appleby's JC Penney Merlin Muffler WalMart Zippy's Another business? (no) Thank you for using the BSP!! Endeavor to have an egregious day! $
Write
Allow the user to enter the names of several local businesses. Sort the business names and display the results. Continue this process until the user is out of business names.
Please use good functional decomposition to make your development easier. (Perhaps one function for sorting an array of strings, another function for swapping two strings, one for displaying an array of strings, and others to maintain the user interface. This is also a good place to use a library, btw.)
Example Run
As an example the program interaction might look something like (the parts in parentheses are typed by the user):
$ ./busisort.out
Welcome to the Business Sorting Program!!!
Please enter the name of a business: (WalMart)
Your business is: WalMart
Another business? (y)
Please enter the name of a business: (JC Penney)
Your businesses are: JC Penney WalMart
Another business? (Y)
Please enter the name of a business: (Merlin Muffler)
Your businesses are: JC Penney Merlin Muffler WalMart
Another business? (yes)
Please enter the name of a business: (Appleby's)
Your businesses are: Appleby's JC Penney Merlin Muffler WalMart
Another business? (Yes)
Please enter the name of a business: (Zippy's)
Your businesses are: Appleby's JC Penney Merlin Muffler WalMart Zippy's
Another business? (no)
Thank you for using the BSP!!
Endeavor to have an egregious day!
$
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 4 images