hw7.h

//Filename: hw7.h Class: CS 1570

//Description: Contains header information for the sorting timer program

#ifndef HW7_H

#define HW7_H

#include<iostream>

using namespace std;

#include "bubbleSort.h"

#include "nickSort.h"

#include "selectionSort.h"

const int RAND_SEED = 42;

const int MAX_SIZE = 15000;

const int TEST_SIZE = 15;

const int TEST_MIN = 5;

const int TEST_MAX = 100;

const int MIN_VAL = 105;

const int MAX_VAL = 15000;

const int RUNS = 10;

//NUM_SORTS will equal the number of sort types since enum starts at 0

enum {BUBBLE, NICK, SELECTION, NUM_SORTS};

//This function greets the user

//Pre: None

//Post: Greeting is output to the screen

void greeting();

//This function gets a random integer

//Pre: max must be greater than (or equal to) min

//Post: returns a random int between min and max (inclusive)

int randNum(const int min, const int max);

//This function fills an array with random data

//Pre: max must be greater than (or equal to) min, size must be less than or

// equal to declared size of array

//Post: The array is filled with integers in the range of min to max

void fillArray(int array[], const int size, const int min, const int max);

//This function sorts an array using the sorting algorithm specified by type

//Pre: size must be less than or equal to declared size of array

// type must be between 0 and NUM_TYPES-1

//Post: The array is sorted

void sortArray(int array[], const int size, const int type);

//This function gets the name of the sorting algorithm specified by type

//Pre: type must be between 0 and NUM_TYPES-1

//Post: Returns the name of the algorithm

string sortName(const int type);

//This function outputs an array

//Pre: size must be less than or equal to declared size of array

//Post: The array is output to the screen

void output(const int array[], const int size);

//This function outputs results

//Pre: type must be between 0 and NUM_TYPES-1

//Post: Results are output

void showResults(float minTime, float maxTime, float avgTime, int type);

//This function says goodbye to the user

//Pre: None

//Post: Signoff is output to the screen

void signoff();

#endif