Similar to most ATM terminals, the program should intake some input from the user and depending on the user’s action request, it should intereact with the database (in this case, the database.csv file provided) to execute the action.
At first, the user should be asked to enter his/her card number (we assume it to be a 6-digit number). If the format of the number entered is verified with the database, then the user should be asked to enter the corresponding PIN code (we assume it to be a 4-digit number). If either the card number or PIN code is incorrect, then the program should display the error and ask the user to enter the number. The program should display the information, which shold be retrieved from the database (Assume USD to KZT to USD xchange rate to be 1 USD = 450 KZT):
P.S I don't know how to upload provided excel document
#include <cstdlib>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <stdio.h>
using namespace std;
Â
class Bank {
  string name, address;
  char acc_type;
  float balance;
Â
public:
  void open_account()
{
  name = "John";
  Â
 Â
  balance = 8000;
 Â
}
Â
  void deposit_money(){
  int Amount;
  Amount = 9500;
  cout << "Enter how much money"
     << " you want to deposit: "
     << Amount << endl;
  balance += Amount;
  cout << "\n Available Balance: "
     << balance;
}
  void withdraw_money(){
  float amount;
  amount = 3200;
  cout << "How much to withdraw: "     << endl;
  balance -= amount;
  cout << "\n Available balance: "
     << balance;
}
  void display_account(){
  cout << "Name: " << name << endl
     << "Address: " << address << endl
     << "Type: " << acc_type << endl
     << "Balance: " << balance << endl
     << endl;
}
};
Â
int main()
{
  Â
  return 0;
}
Comments
Leave a comment