functions.h

//programmers: Anjum and Fletcher

//file: functions.h

#ifndef FUNCtiONS_H

#define FUNCTIONS_H

# include <string>

# include <iostream>

using namespace std;

//function prototypes

/* Description: The presentMenuOptions() function will output available menu options to the screen..

Pre: None..

Post: Menu options output to the screen.

*/

void presentMenuOptions();

/* Description: The getInteger() function will ask user to input an integer and validate the

input to lie between parameter min and parameter max..

Pre: parameter min must be less than parameter max..

Post: Outputs a message to the screen asking the user to input an integer that lies betwen

min and max.

Returns the valid integer input.

*/

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

/* Description: The getInteger() function will ask user to input an integer and validate the

input to be greater than parameter min..

Pre: None..

Post: outputs a message to the screen asking the user to input an integer greater than min.

Returns the validated integer.

*/

int getInteger(const int min);

/* Description: The getBoolean() function will ask the user to input an answer to the question that

will be passed as parameter correctly..

Pre: None..

Post: outputs a message to the screen asking the user to input an answer to a question.

returns the user's answer.

*/

bool getBoolean(const string question);

/* Description: The getHairIndex() function will ask user to input a valid hair color and returns

the hair index associated to that color..

Pre: None..

Post: outputs a message to the screen asking the user to input a valid hair color.

returns the hair index of that color.

*/

float getHairIndex();

/* Description: The getAlienHeight() function will ask the user to input a valid alien height and

will return the valid input..

Pre: None..

Post: outputs a message to the screen asking the user to input a valid alien height.

returns the height of the alien.

*/

int getAlienHeight();

/* Description: The getWavelength() function will compute and return the wave length based on the

hairIndex parameter passed..

Pre: parameter hairIndex must be associated to a hair color..

Post: returns the wave length based on the hairIndex passed.

*/

float getWavelength(const float hairIndex);

/* Description: The getWavelength() function will compute and return the wave length based on the

hairIndex parameter passed..

Pre: parameter n must lie within a range specified by the user.

parameter hairIndex must be associated to a hair color..

Post: returns the wave length based on the hairIndex passed.

*/

float getWavelength(const int n, const float hairIndex);

/* Description: The getWavelength() function will compute and return the wave length depending on

whether the noodle soup is home made or not.

Pre: parameter n must be greater than a minimum value specified by the user..

Post: returns the wave length based on whether or not the noodle soup is home made.

*/

float getWavelength(const int n, const bool isHomeMade);

/* Description: The getWavelength() function will compute and output the wave length of light

based on the height of the alien and the goo grade..

Pre: parameter goo grade must lie within a range specified by the user..

parameter alienHeight must be a valid alien height.

Post: returns the wavelength based on the gooGrade and alienHeight.

*/

float getWavelength(const int gooGrade, const int alienHeight);

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

Pre: None..

Post: Signoff message output to the screen.

*/

void goodbye();

#endif