Docsity

Programming Assignment 2: Implementing Sorting Algorithms - Prof. Mary Califf, Assignments of Information Technology

Toggle sidebar
bg1
Programming Assignment 2:
Implementing Sorting Algorithms
Due date: Friday, March 4, 2005 โ€“ beginning of class
Description:
You are to write three C++ programs. The first program will be an implementation of
insertion sort using linked lists to store the data. Make sure your implementation is
correct and efficient (for insertion sort). The second program is to be an implementation
of heapsort. The third program should implement bottom-up mergesort. Use arrays for
programs 2 and 3. You do not have to use classes or objects for any of the programs.
For each program, you are to read a file of integers, sort them, and write them into an
output file. The input files will contain one integer per line, and the output files should
be in the same format. Your program should accept the names of the input and output
files as command line parameters.
Sample input files will be provided in /home/mecalif/public/itk279/Program2. You will
be using these three programs, along with others that I will provide, to conduct the timing
tests that you will report on in your first paper, which will be due March 11. Further
details concerning the paper will be forthcoming.
Submit:
On paper: printouts of your source code.
Using submit: your source code plus a Makefile if you used one. Use tar to combine
multiple files so that you submit only one file. Name the tar file prog2.tar.

Partial preview of the text

Download Programming Assignment 2: Implementing Sorting Algorithms - Prof. Mary Califf and more Assignments Information Technology in PDF only on Docsity!

Programming Assignment 2:

Implementing Sorting Algorithms

Due date : Friday, March 4, 2005 โ€“ beginning of class Description : You are to write three C++ programs. The first program will be an implementation of insertion sort using linked lists to store the data. Make sure your implementation is correct and efficient (for insertion sort). The second program is to be an implementation of heapsort. The third program should implement bottom-up mergesort. Use arrays for programs 2 and 3. You do not have to use classes or objects for any of the programs. For each program, you are to read a file of integers, sort them, and write them into an output file. The input files will contain one integer per line, and the output files should be in the same format. Your program should accept the names of the input and output files as command line parameters. Sample input files will be provided in /home/mecalif/public/itk279/Program2. You will be using these three programs, along with others that I will provide, to conduct the timing tests that you will report on in your first paper, which will be due March 11. Further details concerning the paper will be forthcoming. Submit : On paper: printouts of your source code. Using submit: your source code plus a Makefile if you used one. Use tar to combine multiple files so that you submit only one file. Name the tar file prog2.tar.