hw8.h

// Programmer: Bushra Anjum

// file: header.h

#ifndef header_h

#define header_h

#include <iostream>

#include <cstdlib>

#include <time.h>

using namespace std;

const int MISSING_COWS = 5;

const int DNA_LENGTH_ORIG = 128;

const int DNA_LENGTH_SAMPLE = 16;

const int TEETH_LENGTH=32;

const int DEAD_COWS = 3;

/* Description: The generateDNAOrig() function creates a 128 character long string of random

characters C(30%), T(20%), G(15%), A(35%)

Pre: None

Post: A c-string of random characters is generated

*/

void generateDNAOrig(char dna[]);

/* Description: The generateDNASample() function creates a 16 character long string of random

characters C(30%), T(20%), G(15%), A(33%), -(2%)

Pre: None

Post: A c-string of random characters is generated

*/void generateDNASample(char dna[]);

/* Description: The getMatch() function compares two c-strings, each 32 character long. It matches

cowDNA inside sampleDNA starting at index startIndex inside sampleDNA.

Pre: sampleDNA is a c-strings of 128 characters and cowDNA is a c-string of 16 characters.

Post: Returns the percentage match.

*/

float getMatch(char sampleDNA[], char cowDNA[], int startIndex);

/* Description: The generateTeeth() function creates a 32 character long string of random

characters N(50%), A(10%), G(10%), L(10%), W(20%)

Pre: None

Post: A c-string of random characters is generated

*/

void generateTeeth(char teeth[]);

/* Description: The dentalMatch() function compares two c-strings, each 32 character long

Pre: Parameters are c-strings.

Post: Returns a true if both c-strings match exactly, false otherwise.

*/

bool dentalMatch(char sampleTeeth[], char cowTeeth[]);

/* Description: The get_random_number() function generates a random number that lies betwen

lower_limit and upper_limit.

Pre: Parameter lower_limit must be less than parameter upper_limit.

Post: Returns a random number that lies between lower_limit and upper_limit.

*/

float get_random_number(const float lower_limit, const float upper_limit);

/* Description: The goodbye() function will output a signoff message to the screen.

Pre: None.

Post: Signoff message output to the screen.

*/

void goodbye();

#endif