hw7.cpp
// Programmer: Jennifer Leopold date: October 20, 2014
// File: hw7.cpp
// Purpose: This program compares the results of two tests
// for diagnosing zombie-ism. The population of
// patients for the study (the number of which is
// a user input with a maximum value of 5000) has
// data randomly generated with values for 3 physical
// characteristics as well as a DNA sequence of length
// 128. Statistics for the diagnosis of this population
// by each test are output at the end of the program.
//
// To compile: fg++ hw7.cpp hw7fncts.cpp -o hw7
//
// To execute: ./hw7
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
#include "hw7.h"
using namespace std;
int main()
{
short numPeopleTested; // number of people tested
short numWantBrains, numStinky, // statistics collected
numAbnormalGait,
numZombiesOnlyByDNATest,
numZombiesOnlyByCharTest,
numZombiesByBothTests;
patientData patients[MAX_NUM_PATIENTS]; // patient info
// Greet user
greeting();
// Get number of people tested
numPeopleTested = getNumPeopleTested();
// Seed the random number generator
srand(time(NULL));
// Populate the array of patient info
getData(patients, numPeopleTested);
// Test for zombie-ism by each of the 2 tests
testByDNA(patients, numPeopleTested);
testByCharacteristics(patients, numPeopleTested);
// Compare and report the statistics for the 2 tests
collectStatistics(patients, numPeopleTested,
numWantBrains, numStinky,
numAbnormalGait,
numZombiesOnlyByDNATest,
numZombiesOnlyByCharTest,
numZombiesByBothTests);
outputResults(numPeopleTested, numWantBrains,
numStinky,numAbnormalGait,
numZombiesOnlyByDNATest,
numZombiesOnlyByCharTest,
numZombiesByBothTests);
// Sign off
goodbye();
return 0;
}