Added many comments outlining ideas

This commit is contained in:
theskywinds 2025-05-28 11:14:16 +02:00
parent bc4343864e
commit 6951364b9a
2 changed files with 18 additions and 3 deletions

View File

@ -3,7 +3,7 @@
namespace AtmAdmin {
char startup() {
char choice{};
std::cout << "1. Change PIN\n" << "2. Change money\n" << "3. Change account name\n" << "Q. Exit the program\n\n";
std::cout << "1. Change PIN\n" << "2. Change account name\n" << "3. Change money\n" << "Q. Exit the program\n\n";
std::cout << ">: ";
std::cin >> choice;

View File

@ -6,15 +6,30 @@
bool handleUserInformation(char choice, std::string& information) {
switch (choice) {
case '1':
// Implement a proper function for entering a new pin.
// The function should have a somewhat complex algorithm that forces the pin to be secure, and unique.
// It should also enforce 4 numbers.
// Code below is a placeholder.
std::cout << "Enter new pin: ";
std::cin >> information;
break;
case '2':
std::cout << "Enter the amount you wish to have: ";
// Implement a function for entering a new username.
// The function should check if the name isn't already taken. If it is, return to start.
// It will also use an algorithm to check if it's a valid username
// This includes no spaces and no starting numbers.
// Ensure that the name is also converted to fully lowercase.
// Code below is a placeholder
std::cout << "Enter your new username: ";
std::cin >> information;
break;
case '3':
std::cout << "Enter your new username: ";
// Simply a way to cheat, very straight-forward.
// Code below is a placeholder
std::cout << "Enter the amount you wish to have: ";
std::cin >> information;
break;
case 'q':