Skip to content

Commit

Permalink
Update Program.h
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndskg authored Jan 7, 2024
1 parent dcd6d38 commit f1dc37c
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions include/black-scholes-cpp/Program.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,64 @@ extern void fast_io_initializer();
// Declare the fast_io variable as a function pointer
extern void (*fast_io)();

// ----------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------
// "Program" Class Declarations
// ----------------------------------------------------------------------------
// -------------------------------------------------------------------------------------------

class Program {
public:
/*--------------------------- MEMBER VARIABLES ------------------------------*/
/*---------------------------------- MEMBER VARIABLES -------------------------------------*/

string inputMode; // Program mode (i.e. USER, FILE, DB, or API)
static constexpr int MAX_BUFFER_SIZE = 10000;

/*------------------------------ CONSTRUCTORS ------------------------------*/
/*------------------------------------- CONSTRUCTORS -------------------------------------*/

// Default constructor.
Program();

// TODO: Implement any relevant custom constructors.


/*--------------------------- KEY MEMBER FUNCTIONS ---------------------------*/
/*---------------------------------- KEY MEMBER FUNCTIONS ----------------------------------*/

/* Processes the command line arguments.
Uses getopt_long to parse the options and their arguments.
Based on the specified mode, it calls the corresponding functions to read input values
from different sources (e.g. user input, a file, a database, or an API). */
//

// Time complexity: O(n), where n = # of command line options
// Space complexity: O(1)
void get_options(int argc, char* argv[]);


// Prints a helpful message about how to use the program for the user when requested.
//

// Time complexity: O(1)
// Space complexity: O(1)
void printHelp(char* argv[]);


// Launches the algorithm by reading input values based on the specified input mode.
//

// Time complexity: O(1)
// Space complexity: O(1)
void launchAlgo(blackScholesModel* model);


// Reads and validates the input mode from the user.
//

// @Return: Returns the validated input mode as a string.
//

// Time complexity: O(1)
// Space complexity: O(1)
string readInputMode();


private:

// TODO: Implement any/all private and/or protected member variables.

}; // class Program
Expand Down

0 comments on commit f1dc37c

Please sign in to comment.