A2/atmFunctions.h

53 lines
1.4 KiB
C
Raw Permalink Normal View History

#ifndef ATMFUNCTIONS_H
#define ATMFUNCTIONS_H
/**
* @brief The entrypoint of the program, displays an interactive menu to the
* user and executes the correct action.
*
*/
void start_atm();
/**
* @brief Prints the ATM menu to the user, with options to print balance,
* deposit, withdraw, or quit.
*
*/
void print_menu();
/**
* @brief Prompts the user for a character, and returns it
*
* @return char The user-inputted character
*/
char get_user_selection();
/**
* @brief Prints the current balance of the user formatted appropriately ($X.XX
* format).
*
* @param dollars The amount of full dollars the user currently has
* @param cents The amount of cents the user currently has
*/
2024-09-22 20:25:00 -06:00
void print_balance(int *pDollars, int *pCents);
/**
* @brief Prompts the user an amount to deposit, validates it, and modifies the
* user's money amount appropriately.
*
* @param dollars The amount of full dollars the user currently has
* @param cents The amount of cents the user currently has
*/
2024-09-22 20:25:00 -06:00
void deposit_money(int *pDollars, int *pCents);
/**
* @brief Prompts the user an amount to withdraw, validates it, and modifies the
* user's money amount appropriately.
*
* @param dollars The amount of full dollars the user currently has
* @param cents The amount of cents the user currently has
*/
2024-09-22 20:25:00 -06:00
void withdraw_money(int *pDollars, int *pCents);
#endif // ATMFUNCTIONS_H