Lab 11 - 3. Call the function selection_sort(). 4. Display...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
  Assignment Information Maximum grade: 100   Due date: November 14, 2008 Instructions: In this lab, you are to modify your code from the previous lab to work with strings instead of integers. In  other words, you are to search and sort an array of strings. Download the file  scrambled_wordlist.txt Use the  string library  to take advantage of its helpful string member functions. You will need to  determine the return types and parameter lists needed for each function. The main() function should do  the following operations:  1. Call the function get_array().  (pass an array as an argument and return the number of  elements. The function gets words from the scrambled_wordlist.txt file and puts them into the  array of strings)   2. Display the array by calling display_array().  (display them in rows of 5 words across)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 3. Call the function selection_sort(). 4. Display the sorted array using display_array(). 5. Ask the user for a search word. 6. Call the linear_search(). 7. Display the position of the search word. 8. Call the binary search(). 9. Display the position of the search word. 10. Ask the user "Do you want to process another array?" and if so do it all again. Upload and submit the stringfun.cpp file and the stringfun.txt script results file via WebCT. Assignment files: To view an assignment file, click its filename. Files Modification date Size scrambled_wordlist.txt November 12, 2008 10:25am 2.9 KB Submissions: You can only submit your assignment once. No re-submission is permitted. Notification: The instructor will not be notified via email when you submit this assignment....
View Full Document

This document was uploaded on 05/01/2011.

Ask a homework question - tutors are online