/*
//File: useful.h
//Header file for useful functions library

//int GetInteger(const char* prompt, int min = INT_MIN, int max = INT_MAX)
//Libraries Used: iostream, cassert, climits
//Using: std::cin, std::cout, std::endl, std::string
//Accepts the following parameters: prompt (a string that asks the user 
//for input), min  (the minimum acceptable return value, and max (the 
//maximum acceptable return value).
//Preconditions: min < max
//Postconditions: Returns an integer between min and max, inclusively, 
//as entered by the user.

//double GetDouble(const char* prompt)
//Libraries Used: iostream
//Using: std::cin, std::cout, std::endl
//Gets a valid double from the user, using prompt.
//Preconditions: none
//Postconditions: Returns a double.

//double GetDouble(const char* prompt, double min, double max)
//Libraries Used: iostream, cassert
//Using: std::cin, std::cout, std::endl
//Accepts the following parameters: prompt (a string that asks the user 
//for input), min  (the minimum acceptable return value, and max (the 
//maximum acceptable return value).
//Preconditions: min < max
//Postconditions: Returns a double between min and max, inclusively, 
//as entered by the user.

//char GetChar(const char* prompt)
//Libraries Used: iostream
//Using: std::cin, std::cout, std::endl
//Gets a valid character from the user, using prompt.
//Preconditions: none
//Postconditions: Returns a character, as entered by the user.

//bool Ask(const char* prompt)
//Libraries Used: iostream
//Using: std::cin, std::cout, std::endl
//Asks the user a yes/no question and gets a valid answer
//Preconditions: none
//Postconditions: Returns true if the user answered Y; false if they answered N

//void DisplayDollar(double amount)
//Libraries Used: iostream, iomanip
//Using: std::cout, std::fixed, std::showpoint, std::setprecision, std::right
// std::setw, std::setfill
//Preconditions: none
//Postconditions: amount has been printed to the screen in the form $***12.34

//double Distance(double x1, double y1, double x2, double y2)
//Libraries Used: cmath
//Using: none
//Preconditions: (x1, y1) and (x2, y2) are Cartesian coordinate points
//Postconditions: returns the distance between the two points

//template <class T>
//void Swap(T& a, T& b)
//Libraries used: none
//Using: none
//Preconditions:  a and b are of any type with the assignment operator defined
//Postconditions:  a contains the data from b, and vice versa

*/

#include <climits>

#ifndef USEFUL_H
#define USEFUL_H

namespace RohnA
{

	int GetInteger(const char* prompt, int min = INT_MIN, int max = INT_MAX);

	double GetDouble(const char* prompt);

	double GetDouble(const char* prompt, double min, double max);

	char GetChar(const char* prompt);

	bool Ask(const char* prompt);

	void DisplayDollar(double amount);

	double Distance(double x1, double y1, double x2, double y2);
	
	template <class T>
	void Swap(T& a, T& b)
	{
		T temp = a;
		a = b;
		b = temp;
	}

}

#endif