Question: This Mini-Project is on packaging frequently used functions in separate libraries. Each library should have a header file, which contains function declarations, and a source

 This Mini-Project is on packaging frequently used functions in separate libraries.Each library should have a header file, which contains function declarations, and

This Mini-Project is on packaging frequently used functions in separate libraries. Each library should have a header file, which contains function declarations, and a source file, which contains function definitions. You should also implement an application which calls the test functions of each library, hence each function coded will be called. You can use either Cor C++ in your project. Below are the libraries and functions that you should implement. The last library, myself, should contain at least three functions of your own, as well as the test function: Sorting library sort.h void quicksort (int arr int count Sorts the given array using QuickSort void shell Sort (int arr int count Sorts the given array using ShellSort void bubble Sort (int arr[], int count Sorts the given array using Bubblesort void selectionsort (int arr int count Sorts the given array using SelectionSort int testsort Checks whether the functions in the library behave as expected or not. You should return a non- zero value if everything is OK, zero otherwise. To test the functions, create integer arrays of different sizes, having both unsorted and sorted versions. Then call the related function with the unsorted version and compare the result with the sorted version. You can create the sorted version of the array with a function that you know for sure works correctly ke gsort in stdlib. File reading/writing library file.h int read FromFile(int *data, unsigned int const char *filename) Size Reads the integers in the given file and returns the number of integers successfully read. int writeToFile(const int data unsigned int size const char *filename Writes the integers to the given file and returns the number of integers successfully written. int test File() Checks whether the functions in the library behave as expected or not. You should return a non- zero value if everything is OK, zero otherwise

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!