/
/
/
Question Description In this homework, you will practice sorting algorithms and
Not my Question
Flag Content

# Question : Question Description In this homework, you will practice sorting algorithms and

Question

Description In this homework, you will practice sorting algorithms and recursive functions. From a text file containing several integers which you'll save into an array, you'll need to print out the original array, sort the array according to provided arguments, and then print the final sorted array Problem You will be given a text file. This text file contains several integers that need to be sorted (in either ascending or descending order). Sort these integers, and then print the sorted array to the screen (cout) in accordance with the arguments provided. Instructions on how to implement the sorting algorithm are listed later in this document. We will be giving you an outline of how it works, but you will be implementing that functionality yourself. We've given you a list of functions (see purple text later in document) that will need to be implemented, but the parameters that you use and the contents are entirely up to you You will be reading your arguments from the command line. The name of the input file will be passed as argument 1, argv [1]. The number of lines in the file will be passed as argument 2, argv [21. The sorting order ("ascending" or "descending") will be passed as argument 3, argv [3]. The string "ascending" or "descending" will be given in lowercase. The sorting type ("normal" or "recursive") will be passed as argument 4, argv [4] Text File Contents The text file will contain several integers, each on a different line. The number of lines passed in as an argument will always be consistent with number of lines in the text file when we grade this.

## Solution 5 (1 Ratings )

Solved
Computer Science 11 Months Ago 31 Views
This Question has Been Answered!