// Stephen Bassoli // CSE 124 Section 01 // Lab 3 #ifndef VARIABLES_H #define VARIABLES_H class Variables { private: char Ident[20]; bool Init; bool Declared; int TableNumber; // TableNumber does not serve a purpose in my program, it is merely there to identify // the order in which the variable was declared public: Variables(); // Initial Values: Init and Declared both false, TableNumber at -1 // Process: Sets values of variables void Initialize(); // Input: None // Precond: Must be declared // Process: Initializes the varaible // Output: None // Postcond: None void Declare(char* name); // Input: Variable name // Precond: Must not start with a number // Process: Declares variable, sets name of variable, increments the TableNumber // Output: None // Postcond: None bool CheckInit(); // Input: None // Precond: None // Process: Checks if the variable is initialized // Output: Returns true if init is true // Postcond: None bool CheckDec(); // Input: None // Precond: None // Process: Checks if the variable is declared // Output: Returns true if Declared is true // Postcond: None char* ReturnIdent(); // Input: None // Precond: None // Process: Displays the variable name // Output: Returns the Ident // Postcond: None }; #endif