All of the work in this project is my own!  I have not left copies of my code in public folders on university computers. I have not given any of this project to others. I will not give any portion of this project to others taking this class. I realize that the penalty for turning in work that is not my own can range from an "F" in the class to dismissal from Trinity University. 

                                    Print Title  __________________________    Time Required = ______.____ Hrs.

                                    Signature   __________________________ (pledged)


Athlete Class Lab - Main Program
Individual Lab
15 Points

Make Any Changes Necessary For Compilation

1] Visual Studio Net 2008 should now be installed on your computer; you may use one of the classroom systems. Begin with a copy of the basic project folder. Start With a blank Project. Your main program shall begin as follows:

For purposes of this lab, let us assume that you place the folder in C:\Temp. I encourage you to do so.

2] Rename your folder Athlete-1. Use the following main program. Replace Dr. Thomas E. Hicks with your name.
 

////////////////////////////////////////////////////////////////////////////////// 
////////////////////////////////////////////////////////////////////////////////// 
//                                                                              // 
//                                   Main.cpp                                   // 
//                                                                              // 
//  Purpose    :  Create a main program which contains an Athlete class which   // 
//                provides students with an opportunity to create constructors, // 
//                destructors, display, and set methods. Practice input and     // 
//                output using stdio.h functionality. This will be the first    // 
//                C++ program partitioned properly into a .cpp and .hpp         // 
//                configuration. Phased in testing is also illustrated.         // 
//                                                                              // 
//  Written By : Dr. Thomas E. Hicks         Environment : Windows 2008 Server  //
//  Date       : 8/30/2006                    Compiler : Visual Studio Net 2008 // 
////////////////////////////////////////////////////////////////////////////////// 
//////////////////////////////////////////////////////////////////////////////////

# include "utilities.hpp"
# define ATHLETE_DIAGNOSTIC_LEVEL 1
# define ATHLETE_CLASS

int main (int argc, char * argv[]){
    puts ("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
    puts ("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
    puts ("++                 Create & Test Class Athlete               ++");
    puts ("++                                                           ++");
    puts ("++                         Writen By                         ++");
    puts ("++                    Dr. Thomas E. Hicks                    ++");
    puts ("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
    puts ("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");

    puts ("\n======================== Start Of Main ========================\n");
//	TestAthlete();

    puts ("\n========================= End Of Main =========================\n");

    return (0);
}

3] Add the following class to Main:
 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                     Class Athlete                            //
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
class Athlete
{
public:
   Athlete (char NewName[] = "", int NewNo = 0, int NewSportNo = 0, 
            double NewEquipmentValue = 0.0);  
   Athlete ( int NewNo, char NewName[] = "", int NewSportNo = 0, 
            double NewEquipmentValue = 0.0);  
  
   ~Athlete (void);
   void Set (char NewName[] = "", int NewNo = 0, int NewSportNo = 0, 
             double NewEquipmentValue = 0.0); 
   bool Get(void);
   long int  Key(void);         // Accessor Which Explicitly Returns No.

   void Display(char Message[] = "");
   friend ostream & operator << (ostream & OutputStream, Athlete A);

// I have decided that Name is to be the Primary Character Key for this record type.   
	bool operator == (const char Key[]);
	bool operator >  (const char Key[]);
	bool operator >= (const char Key[]);
	bool operator <  (const char Key[]);
	bool operator <= (const char Key[]);
	bool operator != (const char Key[]);
	void operator =  (const char Key[]);

// I have decided that No is to be the Primary Integer Key for this record type.   
	bool operator == (const long int Key);
	bool operator >  (const long int Key);
	bool operator >= (const long int Key);
	bool operator <  (const long int Key);
	bool operator <= (const long int Key);
	bool operator != (const long int Key);
	void operator =  (const long int Key);

// I have decided that Name is to be the Primary Key for this record type.   
	bool operator == (const Athlete & A);
	bool operator >  (const Athlete & A);
	bool operator >= (const Athlete & A);
	bool operator <  (const Athlete & A);
	bool operator <= (const Athlete & A);
	bool operator != (const Athlete & A);
	void operator =  (const Athlete & A);

private:
	char 
		Name [40];
	long int
		No, 
		SportNo;
	double
		EquipmentValue;
};

// ------------------------- Non-Class Functions Prototypes-----------------------

	void TestAthlete(void);

//Place Class Functions HERE

4] Add the following test function to the bottom of your program. Comment out all of the testing. I recommend that you write one function and then uncomment out enough testing to test it. Write the next and test it. Add the test function below to your class.
 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Function TestAthlete                         //
//                                                                              //
// Purpose : Test each and every method in class Athlete.                       //
//                                                                              //
//  Written By : Dr. Thomas E. Hicks          Environment : Windows XP          //
//  Date       : X/XX/XXXX                    Compiler    : Visual Studio Net   // 
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
void TestAthlete(void)
{
	puts("\n\n*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("************************* Start TestAthlete ***********************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");

	if (ATHLETE_DIAGNOSTIC_LEVEL <= 1)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("================= Testing Constructor & Destructor 1 ==============");
	puts("===================================================================");
	puts("===================================================================\n");

		Athlete
			Athlete1,
			Athlete2("Ricardo Alcantar"),
			Athlete3("Rebecca Ingram", 333),
			Athlete4("Jason Leezer", 444, 11),
			Athlete5("Amy West", 555, 1, 55.55),
			Athlete6(666),
			Athlete7(777, "Michael Hall"),
			Athlete8(888, "Britton Horn", 5),
			Athlete9(999, "Jennifer West", 4, 99.99),
			CSCI3320[4];

   			HitCarriageReturnToContinue();
	}	

	if (ATHLETE_DIAGNOSTIC_LEVEL <= 2)
	{
		puts("\n\n===================================================================");
		puts("===================================================================");
		puts("=================== Testing Display 2 =============================");
		puts("===================================================================");
		puts("===================================================================\n");
		
		int
			Pos;
		Athlete
			Athlete1,
			Athlete2("Ricardo Alcantar"),
			Athlete3("Rebecca Ingram", 333),
			Athlete4("Jason Leezer", 444, 11),
			Athlete5("Amy West", 555, 1, 55.55),
			Athlete6(666),
			Athlete7(777, "Michael Hall"),
			Athlete8(888, "Britton Horn", 5),
			Athlete9(999, "Jennifer West", 4, 99.99),
			CSCI3320[4];

		Athlete9.Display();
		printf("\n----------------------------\n\n");
		Athlete5.Display("Athlete5 Info Is As Follows:");
		printf("\n----------------------------\n\n");
		Athlete1.Display("\nAthlete1 Info Is As Follows:");
		Athlete2.Display("\nAthlete2 Info Is As Follows:");
		Athlete3.Display("\nAthlete3 Info Is As Follows:");
		Athlete4.Display("\nAthlete4 Info Is As Follows:");
		Athlete5.Display("\nAthlete5 Info Is As Follows:");
		Athlete6.Display("\nAthlete6 Info Is As Follows:");
		Athlete7.Display("\nAthlete7 Info Is As Follows:");
		Athlete8.Display("\nAthlete8 Info Is As Follows:");
		Athlete9.Display("\nAthlete9 Info Is As Follows:");
		printf("\n----------------------------\n\n");
		for (Pos = 0; Pos <= 3; Pos ++)
			CSCI3320[Pos].Display("Displaying An Array Element");
		HitCarriageReturnToContinue();
	}
	

	if (ATHLETE_DIAGNOSTIC_LEVEL <= 3)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("====================== Testing Set Method 3 =======================");
	puts("===================================================================");
	puts("===================================================================\n");

	Athlete
		Athlete1("Amy West", 111, 1, 11.11),
		Athlete2(222, "Jennifer West", 2, 22.22),
		Athlete3("Britton Horn", 333,3, 33.33),
		Athlete4(444, "Abdrew Trinoker", 14, 44.44),
		Athlete5("Andrew Hamel", 555, 15, 55.55);

		Athlete1.Display("\nInitial Contents Of Athlete1");
		Athlete2.Display("\nInitial Contents Of Athlete2");
		Athlete3.Display("\nInitial Contents Of Athlete3");
		Athlete4.Display("\nInitial Contents Of Athlete4");
		Athlete5.Display("\nInitial Contents Of Athlete5");

		Athlete1.Set("AAA",123, 34, 56.78);
		Athlete2.Set("BBB",234, 56);
		Athlete3.Set("CCC",345);
		Athlete4.Set("DDD");
		Athlete5.Set();

		Athlete1.Display("\nNew Contents Of Athlete1");
		Athlete2.Display("\nNew Contents Of Athlete2");
		Athlete3.Display("\nNew Contents Of Athlete3");
		Athlete4.Display("\nNew Contents Of Athlete4");
		Athlete5.Display("\nNew Contents Of Athlete5");

		HitCarriageReturnToContinue();
	}

	if (ATHLETE_DIAGNOSTIC_LEVEL <= 4)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("======================= Testing < Overload 4 ======================");
	puts("===================================================================");
	puts("===================================================================\n");

	Athlete
		Athlete1("Amy West", 111, 1, 11.11),
		Athlete2("Ceasar Giralt", 222, 2, 22.22),
		Athlete3("Cristano Rimirez", 333, 3, 33.33),
		Athlete4("Now I Lay Me Down To Sleep I Pray The Lord My Soul To Keep", 444, 4, 44.44);

		puts("\n\n\n| 12345678901234567890123456789012345678901234567890 |");
		puts("------------------------------------------------------");
		printf("| ");
		fflush(stdout);
		cout << Athlete1;
		cout.flush();
		printf(" |\n");
		puts("------------------------------------------------------");
		printf("| ");
		fflush(stdout);
		cout << Athlete2;
		cout.flush();
		printf(" |\n");
		puts("------------------------------------------------------");
		printf("| ");
		fflush(stdout);
		cout << Athlete3;
		cout.flush();
		printf(" |\n");
		puts("------------------------------------------------------");
		printf("| ");
		fflush(stdout);
		cout << Athlete4;
		cout.flush();
		printf(" |\n");
		puts("------------------------------------------------------");
		puts("| 12345678901234567890123456789012345678901234567890 |\n\n");
		HitCarriageReturnToContinue();
	}


	if (ATHLETE_DIAGNOSTIC_LEVEL <= 5)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("================= Testing Operator Overloads 5 ====================");
	puts("===================================================================");
	puts("================== Compare Athlete With String ====================");
	puts("===================================================================\n");

	Athlete
		Athlete1("AAA", 444, 4, 44.44),
		Athlete3("TTT", 111, 1, 11.11),
		Athlete5("CCC", 333, 3, 33.33);   


		if (Athlete5 == "AAA")                   // Test == Char
		  puts("True ---> CCC == AAA");
		else
		  puts("False --> CCC == AAA");
		if (Athlete5 == "CCC")                   // Test == Char
		  puts("True ---> CCC == CCC\n");
		else
		  puts("False --> CCC == CCC\n");


		if (Athlete5 > "AAA")                   // Test > Char
		  puts("True ---> CCC > AAA");
		else
		  puts("False --> CCC > AAA");
		if (Athlete5 > "FFF")                   // Test > Char
		  puts("True ---> CCC > FFF\n");
		else
		  puts("False --> CCC > FFF\n");


		if (Athlete5 >= "AAA")                  // Test >= Char
		  puts("True ---> CCC >= AAA");
		else
		  puts("False --> CCC >= AAA");
		if (Athlete5 >= "CCC")                  // Test >= Char
		  puts("True ---> CCC >= CCC");
		else
		  puts("False --> CCC >= CCC");
		if (Athlete5 >= "FFF")                  // Test >= Char
		  puts("True ---> CCC >= FFF\n");
		else
		  puts("False --> CCC >= FFF\n");


		if (Athlete5 < "AAA")                   // Test < Char
		  puts("True ---> CCC < AAA");
		else
		  puts("False --> CCC < AAA");
		if (Athlete5 < "FFF")                   // Test < Char
		  puts("True ---> CCC < FFF\n");
		else
		  puts("False --> CCC < FFF\n");


		if (Athlete5 <= "AAA")                   // Test <= Char
		  puts("True ---> CCC <= AAA");
		else
		  puts("False --> CCC <= AAA");
		if (Athlete5 <= "CCC")                   // Test <= Char
		  puts("True ---> CCC <= CCC");
		else
		  puts("False --> CCC <= CCC");
		if (Athlete5 <= "FFF")                   // Test <= Char
		  puts("True ---> CCC <= FFF\n");
		else
		  puts("False --> CCC <= FFF\n");


		if (Athlete5 != "AAA")                   // Test != Char
		  puts("True ---> CCC != AAA");
		else
		  puts("False --> CCC != AAA");
		if (Athlete5 != "CCC")                   // Test != Char
		  puts("True ---> CCC != CCC\n");
		else
		  puts("False --> CCC != CCC\n");


		Athlete5.Display("\nContents of Athlete5"); // Test = Char
		Athlete5 = "Runner, Road";
		Athlete5.Display("\nNew Contents of Athlete5");

		HitCarriageReturnToContinue();

	puts("\n\n===================================================================");
	puts("================== Compare Athlete With Integer ===================");
	puts("===================================================================\n");
		Athlete5.Set("CCC", 3, 3, 33.33);   

		if (Athlete5 == 5)                   // Test == Integer
		  puts("True ---> 3 == 5");
		else
		  puts("False --> 3 == 5");
		if (Athlete5 == 3)                   // Test == Integer
		  puts("True ---> 3 == 3\n");
		else
		  puts("False --> 3 == 3\n");


		if (Athlete5 > 5)                   // Test > Integer
		  puts("True ---> 3 > 5");
		else
		  puts("False --> 3 > 5");
		if (Athlete5 > 1)                   // Test > Integer
		  puts("True ---> 3 > 1\n");
		else
		  puts("False --> 3 > 1\n");


		if (Athlete5 >= 5)                   // Test >= Integer
		  puts("True ---> 3 >= 5");
		else
		  puts("False --> 3 >= 5");
		if (Athlete5 >= 1)                   // Test >= Integer
		  puts("True ---> 3 >= 1");
		else
		  puts("False --> 3 >= 1");
		if (Athlete5 >= 3)                   // Test >= Integer
		  puts("True ---> 3 >= 3\n");
		else
		  puts("False --> 3 >= 3\n");


		if (Athlete5 < 5)                   // Test < Integer
		  puts("True ---> 3 < 5");
		else
		  puts("False --> 3 < 5");
		if (Athlete5 < 1)                   // Test < Integer
		  puts("True ---> 3 < 1\n");
		else
		  puts("False --> 3 < 1\n");


		if (Athlete5 <= 5)                   // Test <= Integer
		  puts("True ---> 3 <= 5");
		else
		  puts("False --> 3 <= 5");
		if (Athlete5 <= 1)                   // Test <= Integer
		  puts("True ---> 3 <= 1");
		else
		  puts("False --> 3 <= 1");
		if (Athlete5 <= 3)                   // Test <= Integer
		  puts("True ---> 3 <= 3\n");
		else
		  puts("False --> 3 <= 3\n");


		if (Athlete5 != 5)                   // Test != Integer
		  puts("True ---> 3 != 5");
		else
		  puts("False --> 3 != 5");
		if (Athlete5 != 3)                   // Test != Integer
		  puts("True ---> 3 != 3\n");
		else
		  puts("False --> 3 != 3\n");

		Athlete5.Display("\n\nContents of Athlete5"); // Test = Integer
		Athlete5 = 21;
		Athlete5.Display("\nNew Contents of Athlete5");

		HitCarriageReturnToContinue();

	puts("\n\n===================================================================");
	puts("========== Compare Athlete With Another Athlete Object ============");
	puts("===================================================================\n");
		Athlete5.Set ("CCC", 111, 1, 11.11);
		Athlete3.Set ("TTT", 222, 2, 22.22);
		Athlete1.Set ("AAA", 3, 3, 33.33);   

		if (Athlete5 == Athlete3)                 // Test == Athlete
		  puts("True ---> CCC = TTT");
		else
		  puts("False --> CCC = TTT");
		if (Athlete5 == Athlete5)                 // Test == Athlete
		  puts("True ---> CCC = CCC\n");
		else
		  puts("False --> CCC = CCC\n");


		if (Athlete5 > Athlete3)                  // Test > Athlete
		  puts("True ---> CCC > TTT");
		else
		  puts("False --> CCC > TTT");
		if (Athlete5 > Athlete1)                  // Test > Athlete
		  puts("True ---> CCC > AAA\n");
		else
		  puts("False --> CCC > AAA\n");


		if (Athlete5 >= Athlete3)                  // Test >= Athlete
		  puts("True ---> CCC >= TTT");
		else
		  puts("False --> CCC >= TTT");
		if (Athlete5 >= Athlete5)                  // Test >= Athlete
		  puts("True ---> CCC >= CCC");
		else
		  puts("False --> CCC >= CCC");
		if (Athlete5 >= Athlete1)                  // Test >= Athlete
		  puts("True ---> CCC >= AAA\n");
		else
		  puts("False --> CCC >= AAA\n");


		if (Athlete5 < Athlete3)                   // Test < Athlete
		  puts("True ---> CCC < TTT");
		else
		  puts("False --> CCC < TTT");
		if (Athlete5 < Athlete1)                   // Test < Athlete
		  puts("True ---> CCC < AAA\n");
		else
		  puts("False --> CCC < AAA\n");


		if (Athlete5 <= Athlete3)                   // Test <= Athlete
		  puts("True ---> CCC <= TTT");
		else
		  puts("False --> CCC <= TTT");
		if (Athlete5 <= Athlete5)                   // Test <= Athlete
		  puts("True ---> CCC <= CCC");
		else
		  puts("False --> CCC <= CCC");
		if (Athlete5 <= Athlete1)                   // Test <= Athlete
		  puts("True ---> CCC <= AAA\n");
		else
		  puts("False --> CCC <= AAA\n");


		if (Athlete5 != Athlete3)                   // Test != Athlete
		  puts("True ---> CCC != TTT");
		else
		  puts("False --> CCC != TTT");
		if (Athlete5 != Athlete5)                   // Test != Athlete
		  puts("True ---> CCC != CCC\n");
		else
		  puts("False --> CCC != CCC\n");

		Athlete5.Display("\nContents of Athlete5");
		Athlete3.Display("\nContents of Athlete3");
		Athlete5 = Athlete3;                        // Test = Athlete
		Athlete5.Display("\nNew Contents of Athlete5");
		Athlete3.Display("\nNew Contents of Athlete3");

		HitCarriageReturnToContinue();
	}

	
	if (ATHLETE_DIAGNOSTIC_LEVEL <= 6)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("============================== Test Key 6 =========================");
	puts("===================================================================");
	puts("===================================================================\n");

	Athlete
		Athlete1("Amy West", 111, 1, 11.11),
		Athlete2(222, "Jennifer West", 2, 22.22),
		Athlete3("Britton Horn", 333,3, 33.33),
		Athlete4(444, "Abdrew Trinoker", 14, 44.44),
		Athlete5("Andrew Hamel", 555, 15, 55.55);
  

		printf ("Athlete1.Key() = %ld\n", Athlete1.Key());
		printf ("Athlete2.Key() = %ld\n", Athlete2.Key());
		printf ("Athlete3.Key() = %ld\n", Athlete3.Key());
		printf ("Athlete4.Key() = %ld\n", Athlete4.Key());
		printf ("Athlete5.Key() = %ld\n", Athlete5.Key());

		HitCarriageReturnToContinue();

	}


	if (ATHLETE_DIAGNOSTIC_LEVEL <= 8)
	{
	puts("\n\n===================================================================");
	puts("===================================================================");
	puts("========================= Test Get 8  =============================");
	puts("===================================================================");
	puts("===================================================================\n");
	
	Athlete
		Athlete1;   

		Athlete1.Display("Blank Athlete1");

		while (Athlete1.Get())
		{
				Athlete1.Display("Newly Filled Athlete1");
				puts ("\n\n\n");
		}	
		puts ("Athlete Fill Was Aborted By Entering A Blank Description");
		HitCarriageReturnToContinue();

	}

	puts("\n\n*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*************************** End TestAthlete **************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************");
	puts("*******************************************************************\n\n");

}

5] Always document each and every function. You may cut and paste from my documentation below if your replace my name with yours, the environment with yours (Vista, Windows 7, etc.) and the date.
 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                               Athlete.cpp                                    //
//                                                                              //
// Purpose    : House all non-template methods for class Athlete.               //
//              House function TestAthlete(void).                               //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

# include "Athlete.hpp"

////////////////////////////////////////////////////////////////////////////////// 
////////////////////////////////////////////////////////////////////////////////// 
//                                                                              // 
//                          Athlete [Constructor]                               // 
//                                                                              // 
//  Purpose    : Create and initialize a Athlete Object. Set the Name to blank  // 
//               Set the No to 0. Set the SportNo to 0. Set the EquipmentValue  //
//               to 0.00.                                                       // 
//               Do whatever is necessary to prevent the character overflow     //
//               when a large NewName is passed to the constructor.             //
//                                                                              // 
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
Athlete::Athlete (char NewName[], int NewNo, int NewSportNo, 
                  double NewEquipmentValue)
{
# ifdef ATHLETE_DIAGNOSTIC_LEVEL //---------------------------------------------------
	if (ATHLETE_DIAGNOSTIC_LEVEL <= 1)
		puts("Evoking Constructor Athlete (NewName,NewNo,NewSportNo,NewQuantity,NewEquipmentValue)");
# endif // ATHLETE_DIAGNOSTIC_LEVEL --------------------------------------------------

}

Athlete::Athlete (int NewNo, char NewName[], int NewSportNo, 
            double NewEquipmentValue)
{
# ifdef ATHLETE_DIAGNOSTIC_LEVEL //---------------------------------------------------
	if (ATHLETE_DIAGNOSTIC_LEVEL <= 1)
		puts("Evoking Constructor Athlete (NewNo,NewName,NewSportNo,NewQuantity,NewEquipmentValue)");
# endif // ATHLETE_DIAGNOSTIC_LEVEL --------------------------------------------------

}

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Method ~Athlete                              //
//                                                                              //
//  Purpose    : Do all that is necessary to destroy a Athlete Object.          // 
//               In this class, nothing is necessary. Temporarily displays      // 
//               printf ("Evoking Destructor ~Athlete(void);                    // 
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 
Athlete::~Athlete (void)
{
# ifdef ATHLETE_DIAGNOSTIC_LEVEL //---------------------------------------------------
	if (ATHLETE_DIAGNOSTIC_LEVEL <= 1)
		puts("Evoking Destructor ~Athlete (void)");
# endif // ATHLETE_DIAGNOSTIC_LEVEL --------------------------------------------------
}

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Method Display                               //
//                                                                              //
//  Purpose    : Professionally display the Athlete information as follows:     // 
//               (Skip two lines at the end)                                    // 
//                                                                              // 
//               Name ...........: Sarah                                        // 
//               No .............: 111                                          // 
//               Sport No .......: 1                                            // 
//               Equipment Value : $ 11.11                                      // 
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Method Set                                   //
//                                                                              //
//  Purpose    : Replaces private data member Name with NewName. Replaces No    // 
//               with NewNo. Replaces SportNo with NewSportNo. Replaces         // 
//               EquipmentValue with NewEquipmentValue.                         // 
//               Do whatever is necessary to prevent the character overflow     //
//               when a large NewName is passed to this function.               //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Method Get                                   //
//                                                                              //
//  Purpose    : Interactively prompt the user for a Name, No, SportNo, and     //
//               EquipmentValue. Use professional, user-friendly prompts.       //
//               Place one prompt on each line. When entering the information   //
//               the screen should look something like the following. If the    // 
//               Name is blank, don't bother prompting for the No, SportNo, or  //
//               Equipment Value. (Skip one line before your prompt for the     //
//               Name)                                                          // 
//                                                                              // 
//               Enter Name  [Hit Return To Exit] : Paul                        // 
//               Enter No ........................: 3333                        // 
//               Enter Sport No ..................: 11                          // 
//               Enter Equipment Value ...........: $ 11.11                     // 
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                        char operator Overloads                               //
//                                                                              //
// Purpose : Overload the operators in such a way that the Name becomes the     //
//           primary character key for the Athlete Class.                       //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                      Athlete operator Overloads                              //
//                                                                              //
// Purpose : Overload the operators in such a way that the Name becomes the     //
//           primary Athlete key for the Athlete Class.                         //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                        int operator Overloads                                //
//                                                                              //
// Purpose : Overload the operators in such a way that the No becomes the       //
//           primary integer key for the Athlete Class.                         //
//                                                                              //
//  Written By : Dr. Thomas E. Hicks     Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 



//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                          Overload << Operator                                //
//                                                                              //
// Purpose : Display the 50 characters that represent this Athlete datatype.    //
//           Left Justify 23 characters for Name                                //
//           One Blank                                                          //
//           Right Justify 7 character No                                       //
//           One Blank                                                          //
//           Right Justify 7 character SportNo                                  //
//           One Blank                                                          //
//           Right Justify 7.2 character EquipmentValue                         //
//           26 + 1 + 8 + 1 + 8 + 1 + 2  = 50                                   //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Method Display50                             //
//                                                                              //
// Purpose : Display the most important 50 characters of the structure.         //
//           Display [26 char left justified Name, 2 blanks, 8 char No,         //
//           2 blanks,  2 char sport, 2 blanks, and 8 char equipment value      //
//           with two digits of accuracy. Use stdio.h only.                     //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Function Key                                 //
//                                                                              //
// Purpose : Accessor Method Which Explicitly Return a long integer [No] that   //
//           represents a long integer this Athlete.                            //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                         Function EquipmentValue_                             //
//                                                                              //
// Purpose : Accessor Method Which Explicitly Return a double [EquipmentValue]  //
//           that represents double of this Athlete.                            //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 


//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                                 Function No_                                 //
//                                                                              //
// Purpose : Accessor Method Which Explicitly Return the Athlete No.            //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date.......: xx/xx/xxxx              Compiler....: Visual Studio Net [C++]  //
//////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////// 

//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////
//                              Function SportNo_                               //
//                                                                              //
// Purpose : Accessor Method Which Explicitly Return the Athlete SportNo.       //
//                                                                              //
//  Written By : Thomas E. Hicks         Environment : Windows 2003 Server      //
//  Date       : X/XX/XXXX                    Compiler    : Visual Studio Net   // 
//////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////


Program By Example

1] Get a copy of the sample code on Ananke


When Finished!

1] Spot Check!

2]   Set the Athlete class diagnostic level to 2

# define Athlete_DIAGNOSTIC_LEVEL 2

3]  Place a copy folder Athlete-1 in  the To Be Graded folder on Ananke.

4] Backup this project on your Y drive. Back up this project on a thumb drive or your personal computer.


5] Those Labs labeled "Individual Assignment" are to be done separately by each individual. Using a pen,  each individual is to print  his/her Title at the top of this document in the space provided and sign it.  Those Labs labeled "Team Assignment" may be done as a team or individually. Using a pen,  each individual on the team is to print print his/her Title at the top of this document in the space provided and sign it.


Turn in the following:

A] Copy of first page of this assignment sheet. Using an ink pen, print your Name and sign this lab at the top. Record the amount of time you spent working on the lab.

B] Listing Main.cpp

C] Make sure your files are on Ananke when you submit this lab

D] Never place your only copy of your project just on Ananke. Never leave a copy of your project on a public server. Always maintain a copy your project to your Y drive. Always maintain a copy your project on your personal computer.

E] Nothing will be graded until this lab form is submitted.  Staple the pages. Fold the lab Horizontally (like a hot dog) and write your name nice and large on the outside.  Place it on the professor desk before the beginning of lecture on the day it is due. All assignments are due the next class period unless otherwise designated on the schedule page.