Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedimage text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Exadata

Authors: Martin Bach, Kristofferson Arao

2nd Edition

1430262427, 9781430262428

More Books

Students also viewed these Databases questions

Question

What comes first?

Answered: 1 week ago