Starting from:

$30

CS202-Project 1 Solved

For this project you will write a program to: a) read-in the 10 first names from a file (the file is a priori known to have exactly 10 entries, of a maximum length of 8 letters each) into a twodimensional character array, b) output the names to the terminal with each one preceded by a number indicating its original order in the list, c) sort the list of names, and then d) output the sorted names both to the terminal and to a file, again with each one preceded by its corresponding original order in the list. Although an example input file (Names.txt) is provided, for grading purposes your project will be tested against a file that we will supply but will not be provided to you beforehand. Our test file will be in the same format as the example input file. The following minimum functionality and structure is required:  Ask the user for the input and output file names.  Read in the list of names from the desired input file.  Store the names list in a two-dimensional character array (Use character arrays (i.e., C-style) to hold your strings)  Print out the unsorted list of names to the terminal, preceded by their original order in the input file.  Sort the list of names alphabetically.  Print the list of sorted names to the terminal, preceded by their original order in the input file.  Write the list of sorted names to a different output file (e.g. SortedNames.txt), preceded by their original order in the input file.  Write multiple functions.  Write your own C-string copy, C-string compare (or other) functions as needed. The following are a list of restrictions:  No usage of external libraries for C-string manipulation is allowed (e.g.  ), or any std::string libraries and data types.  No libraries except  and  are allowed.  No global variables or constants except: a) the fixed number of names, and b) the maximum C-string size.  No usage of pointers or dynamic memory. Example Input File (Names.txt) Contents: Victor Eve Juliet Hector Danielle Romeo Oscar June Ares Dannae Example Output (to Terminal and/or File): Unsorted Data (Original Input Order and Name) ============================= 0 Victor 1 Eve 2 Juliet 3 Hector 4 Danielle 5 Romeo 6 Oscar 7 June 8 Ares 9 Dannae Sorted Data (Original Input Order and Name) =========================== 8 Ares 4 Danielle 9 Dannae 1 Eve 3 Hector 2 Juliet 7 June 6 Oscar 5 Romeo 0 Victor The completed project should have the following properties:  Written, compiled and tested using Linux.  It must compile successfully using the g++ compiler on department machines. Instructions how to remotely connect to department machines are included in the Projects folder in WebCampus.  The code must be commented and indented properly. Header comments are required on all files and recommended for the rest of the program. Descriptions of functions commented properly.  A one page (minimum) typed sheet documenting your code. This should include the overall purpose of the program, your design, problems (if any), and any changes you would make given more time. 

More products