Answer to Question #262012 in C++ for donya

Question #262012

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


1
Expert's answer
2021-11-06T18:56:43-0400
#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;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS