Fully finished build. Removed money & changed README.md

This commit is contained in:
theskywinds 2025-06-18 09:34:20 +02:00
parent 4470cd15e1
commit c9ecb24c75
4 changed files with 7 additions and 25 deletions

View File

@ -2,17 +2,9 @@
An administrative software for use alongside the ATM program at https://www.dragonfocus.dev/TheSkyWinds/ATM-FTXUI-Simulator An administrative software for use alongside the ATM program at https://www.dragonfocus.dev/TheSkyWinds/ATM-FTXUI-Simulator
## Plan ## Information
This program will allow for the creation of new users, deletion of users, editing of money, changing of pin. This program allows the user to safely change name and PIN.
(For the start, simply allow changing the pin & name.) In the future, I might implement a way to change money and manipulate current users (Creating new ones and deleting old ones)
This program will be terminal-only.
## Current plans
- [x] Allow the user to choose different options (Changing pin, name, etc)
- [x] Make a prototype. Allow variables to be stored & displayed.
- [ ] Integrate it into XML.
- [ ] Add a way to create new users.
- [ ] (MAYBE) Add a way to delete users.
Additionally, this program ONLY runs purely in the terminal.

View File

@ -16,7 +16,6 @@ namespace AtmAdmin {
this->m_data ={initAccountNode(m_search)}; this->m_data ={initAccountNode(m_search)};
this->name ={m_data.child_value("name") }; this->name ={m_data.child_value("name") };
this->money ={std::stod(m_data.child_value("money"))};
this->pin ={m_data.child_value("pin")}; this->pin ={m_data.child_value("pin")};
} }
@ -26,7 +25,6 @@ namespace AtmAdmin {
pugi::xml_node initAccountNode (const std::string& toSearch); pugi::xml_node initAccountNode (const std::string& toSearch);
std::string name{}; std::string name{};
double money{};
std::string pin{}; std::string pin{};
private: private:
pugi::xml_document m_doc; pugi::xml_document m_doc;

View File

@ -12,7 +12,6 @@ namespace AtmAdmin {
enum Choice { enum Choice {
PIN, PIN,
NAME, NAME,
MONEY,
}; };
void handleInvalidArguments(int argc) { void handleInvalidArguments(int argc) {
@ -21,7 +20,7 @@ namespace AtmAdmin {
if (argc < 2) { if (argc < 2) {
std::cerr << "The ability to make new accounts is not implemented." << '\n'; std::cerr << "The ability to make new accounts is not implemented." << '\n';
std::cerr << "Please put in a pre-existing name." << std::endl; std::cerr << "Please put in a pre-existing ID" << std::endl;
} }
else else
std::cerr << "Too many arguments." << std::endl; std::cerr << "Too many arguments." << std::endl;
@ -103,13 +102,6 @@ namespace AtmAdmin {
return true; return true;
} }
break; break;
case '3':
// Simply a way to cheat, very straight-forward.
// The code below is a placeholder
std::cout << "Enter the amount you wish to have: ";
std::cin >> mainStorage.money;
break;
case 'q': case 'q':
return false; return false;
default: default:

View File

@ -5,7 +5,7 @@
char startup() { char startup() {
char choice{}; char choice{};
std::cout << "1. Change PIN\n" << "2. Change account name\n" << "3. Change money (UNFINISHED)\n" << "Q. Exit the program\n\n"; std::cout << "1. Change PIN\n" << "2. Change account name\n" << "Q. Exit the program\n\n";
std::cout << ">: "; std::cout << ">: ";
std::cin >> choice; std::cin >> choice;
@ -29,6 +29,6 @@ int main(int argc, [[maybe_unused]] char** argv) {
// Always returns true unless 'Q' is entered. // Always returns true unless 'Q' is entered.
continueLoop = AtmAdmin::handleUserInformation(static_cast<char>(std::tolower(userChoice)), mainStorage); continueLoop = AtmAdmin::handleUserInformation(static_cast<char>(std::tolower(userChoice)), mainStorage);
std::cout << "PIN: " << mainStorage.pin << " || NAME: " << mainStorage.name << " || MONEY: " << mainStorage.money << '\n'; // DEBUG // std::cout << "PIN: " << mainStorage.pin << " || NAME: " << mainStorage.name << '\n'; // DEBUG
} }
} }