HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
장지원 페이지/
[Notion] :
[Notion] :
/
🏧
ATM
/
Pseudo Code__Nov 01

Pseudo Code__Nov 01

7. Display of Transaction History (Admin Menu)

#include <iostream> #include <string> using namespace std; class ATM; class User; class Bank; class ATM { private: Bank* bank; // admin card 넣어야해서 아마 user param에 "Admin"입력하면 작동되게하면될듯 string select_btn; public: user = bank->getUser; //GetUser로 user의 정보를 접근할 수 있어야,, protected여야할 것 같은데 void ShowMenu(User* user){ if (user->IsAdmin() == True) { this->AdminMenu(User* user); } } void AdminMenu(User* user){ cout << "Please select your transaction" << endl; cout << "a. Transaction History" << endl; cin >> select_btn; while (select_btn == "a") { // account information마다 다르게 설정해야함.. 큰 틀은 이렇다아 cout << "Transaction ID: "<< user->GetTransacHis()->id << endl; cout << "Card Number: " << user->GetTransacHis()->card_num << endl; cout << "Transaction Types: " << user->GetTransacHis()->transac_type << endl; cout << "Amount: " << user->GetTransacHis()->amount << endl; cout << "other transaction-specific information" << user->GetTransacHis()->other << endl; } //데이터 txt 파일로 뽑기 ㄷㄷ } }; class User { private: int user_id; string name; bool admin_TF = False; public: void IsAdmin(){ if (//어드민이면 ) { admin_TF = True; } return admin_TF; } void GetTransacHis() { //다른 작업들하면서 여기 하나씩 쌓여야함.. dt들이 } }; class Bank { private: char* transac_history; public: };
 
 

8. Multi-language support

class ATM; class User; class Bank; class ATM { private: int lang; //bilang인지 uni lang인지 public: select_btn //영어로 바꾸기 -> 모든 말을 en을 넣어서 param으로 넘기기 }; class User { private: public: }; class Bank { private: public: };