Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Atm Report

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 25

REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

ATM MACHINE

APRIL 20

SUBMITTED TO
SIR. SHAHROZ BAKHT
SIR. ANJUM NAZIR
SUBMITTED BY
SAFFI UR REHMAN BAIG (S19CSC-01)
UMER AHMED KHAN (S19CSC-02)

1
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

Contents
PROJECT ABSTRACT.....................................................................................................3
INTRODUCTION...........................................................................................................3
DESCRIPTION ABOUT ATM PROGRAM:.......................................................................4
SOLUTION OF ATM PROGRAM:...................................................................................4
EXPLANATION OF ATM PROGRAM:.............................................................................5
HOW ATMs WORK!.....................................................................................................7
PICTORIAL EXPLANATION OF CODE:..........................................................................10
DISCUSSION:.............................................................................................................11
RESULT:.....................................................................................................................11
Conclusion:................................................................................................................12
REFRENCES:...............................................................................................................12

PROJECT ABSTRACT
This application allows the customers to collect cash and transact money
from own account to another just by giving own her pin number. It allows
authorized users to access the system by insert a valid pin number. This

2
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

application also allows to change password and inquiry account balance of


customers. It also enables to make transaction on the current account. It
allows to investment in share market and dept. paying to various
department. Reducing cost to bank because does not require staff work that
many to show customers. Even many advantages to users because every
matter can have carried out anywhere.

INTRODUCTION
An Automatic Teller Machine (ATM) is a computer based machine,
connected to a network, that offers, as basic functions to users, access to
bank account (balance, bank transfers) and retrieval of money.
An automated teller machine, also known as an automated banking
machine, cash machine, cashpoint, cash line or colloquially hole in the wall,
is an electronic telecommunications device that enables the customers of a
financial institution to perform financial transactions without the need
for a human cashier, clerk or bank teller.
On most modern ATMs, the customer is identified by inserting a plastic
ATM card with a magnetic stripe or a plastic smart card with a chip that
contains a unique card number and some security information such as an
expiration date. Authentication is provided by the customer
entering a personal identification number (PIN).
Using an ATM, customers can access their bank deposit or credit accounts
in order to make a variety of transactions such as cash withdrawals, check
balances, or credit mobile phones. If the currency being withdrawn from
the ATM is different from that in which the bank account is denominated
the money will be converted at an official exchange rate. Thus, ATMs often
provide the best possible exchange rates for foreign travelers, and are
widely used for this purpose.

DESCRIPTION ABOUT ATM PROGRAM:


Program Description:
This C Program performs ATM transaction. The types of ATM transaction
are

3
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

1) Balance checking
2) Cash withdrawal
3) Cash deposition.
4) Pay Your Bills.
5) Pay Account Interest

SOLUTION OF ATM PROGRAM:


Program Solution
1. Firstly initialize the ATM pin and amount with some random number.
2. Take the ATM pin as input.
3. If the input pin is equal to the initialized pin, then do the further
operations.
4. Use switch statement to do the operations like Balance checking, Cash
withdrawal, Cash deposition, Pay Bills or Pay Account interest.
5. Use while loop to terminate or restart the process.

EXPLANATION OF ATM PROGRAM:


Program Explanation:
1. Initialize the variables pin, amount and transaction.
2. Ask for the pin from user. If the input pin is equal to 12345, then allow
for the further operations.
4
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

3. Use if and switch statements to do the operations like Check Balance,


Withdraw Cash, Deposit Cash and Quit.
4. For Check Balance simply print the variable amount as output and exit.
5. For Withdraw Cash, first ask the amount to withdraw and store it in the
variable withdraw.
6. If withdraw % 100!= 0, then ask user to enter the amount in multiplies of
100.
7. If withdraw amount is greater than (amount-500), then print the output
as “INSUFFICENT BALANCE”.
8. Otherwise subtract the variable withdraw from variable amount, print
the amount and exit.
9. For deposit operation, ask the user for amount and store it in the
variable deposit.
10. Add the variable deposit to variable amount, print the amount and exit.
11. Our ATM Program has also an option to make bill payments and pay
loans.
12. Also has an option to pay account interest.
11. If quit, then finally ask the user if they wish to continue or not. Ask them
to type 0/1 and store it in the variable transaction.
12. If variable transaction is 1, then continue the operation. Otherwise
terminate the while loop.

HOW ATMs WORK!

5
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

CLASS DIAGRAM:

6
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

7
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

8
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

PICTORIAL EXPLANATION OF CODE:

RESULT:

9
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

Conclusion:
One of the most successful programs in the world which make your life very easy. As I
stated earlier, before you had to go to the bank to make your transactions life
withdrawal of money or deposition of money in fact even to check your balance. ATM
has made our life very easy.

REFRENCES:
 https://www.howitworksdaily.com/how-do-cash-machines-work/
 https://www.researchgate.net/figure/Conceptual-Class-Diagram-for-
ATM_fig4_246987367
 https://mycardpaymentblog.wordpress.com/tag/how-an-atm-transaction-
works/

10
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

ATM CODE

#include <iostream>
#include <time.h>
#include <string.h>
#include <stdlib.h>
using namespace std;

class Bank //base class


{
public:
double startBalance;
string COKAccountHolders;
double limit;
};
//================================================================
===== =============================
class ATMAccountHolders:public Bank //child class inherited by base
class - Bank
{
string accountHolders;
string accountHoldersAddress, branch;
int accountNumber;
double startBalance;
double accountBalance;
double accountInterest;
double amount;
int count;

public:

void deposit();
void withdraw();
11
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

void details();
void payBills();
void accountExit();
void interest();

ATMAccountHolders()
{
accountNumber = 5678;
accountHolders = "Shehroz Bakht";
accountHoldersAddress = "CS Lab 3, Ground Floor, Barrett Hodgson
University";
startBalance = 60000.00;
accountBalance = 20000.00;
branch = "Pkr";
amount = 20000;
}
};

void ATMAccountHolders::interest()
{
system("cls");

cout<<"\n\xB2\xB2\xB2\xB2\\xB2\xB2\xB2\xB2\ATM ACCOUNT
INTEREST PAYMENT\xB2\xB2\xB2\xB2\\xB2\xB2\xB2\xB2\\n\n";
cout<<"\tThe Interest is calculate over the last SIX months on the average
account balance\n";
cout<<"\n\t\tInterest Rate payable is 10% per annum."<<endl;
cout<<"\t\tView the accumulated interest? Press 1 for Yes OR 0 for
NO.\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\

12
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT INTEREST PAYMENT


\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";

cout<<"\n\nThe Names of the Account Holders


are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
accountInterest=accountBalance+(accountBalance*1.050);
cout<<"\tPresent available balance + interest for 6 months :
$"<<accountInterest<<"\n\n";
cout<<"Press any key to Return to the Main Menu\n\n";
system("PAUSE");
}

void ATMAccountHolders::deposit()
{
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT DEPOSIT SYSTEM
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";

13
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\nThe Names of the Account Holders


are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
cout<<"\tEnter the Amount to be Deposited $";

double amount;
cin>>amount;
accountBalance=startBalance+amount ;
cout<<"\n\tYour new available Balanced Amount is
$"<<accountBalance<<endl ;
cout<<"\n\t\t\tThank You!\n\n"<<endl;
cout<<"Press any key to Return to the Main Menu\n\n";
system("PAUSE");
}

void ATMAccountHolders::withdraw()//Withdrawal Transactions


{
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WTHDRAWAL
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";

14
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\nThe Names of the Account Holders


are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"\tStarting account balance :$"<<startBalance<<"\n\n";
cout<<"\tPresent available balance :$"<<accountBalance<<"\n\n";
cout<<"\tEnter the Amount to be Withdrawn $";

double amount;
cin>>amount;

if(amount>accountBalance||amount>9000)//Limit set at $9000


maximum after paying bills
{
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WITHDRAWAL
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
cout<<"\n\nThe Names of the Account Holders
are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";

15
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"\n\tInsufficient Available Balance in your account.\n\n"<<endl;
cout<<"\t\t\tSorry !!\n"<<endl;
system("PAUSE");
}
else
{
double b;
accountBalance=startBalance-amount ;
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT WTHDRAWAL
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
cout<<"\n\nThe Names of the Account Holders
are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"Your new available Balanced Amount is
$"<<accountBalance<<endl ;

16
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"Press any key to Return to the Main Menu\n\n";


system("PAUSE");
}

void ATMAccountHolders::payBills()
{
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM BILLS PAYMENT SYSTEM
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n";

cout<<"\n\nThe Names of the Account Holders


are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"Pay Electric Company electricity bill of $2000.00 now?\n\n";
cout<<"\t\tPress 1 for Yes OR Press 0 for No\n\n";

int r;

17
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cin>>r;
if(r=1)
{accountBalance=startBalance-2000;
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM BILLS PAYMENT SYSTEM
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n";
cout<<"\n\tYour electricity bill of $2000.00 has been paid.\n\n";
cout<<"\tYour account new Available Balanced Amount is
$"<<accountBalance<<endl ;

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\n\n";
cout<<"Press any key to Return to the Main Menu\n\n";
}
if(r=0)
{
cout<<"\n===========================ATM BILLS PAYMENT
SYSTEM==========================\n\n";
cout<<"\n\n\tExiting Bill Payment System. Thank you!.\n\n";
cout<<"====================++THANK YOU+
+============================\n\n";
}
system("PAUSE");
};

void ATMAccountHolders::details()
{
system("cls");

18
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT DETAILS
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
cout<<"\n\nThe Names of the Account Holders
are :"<<accountHolders<<"\n\n";
cout<<"\tThe Account Holders' address
is :"<<accountHoldersAddress<<"\n\n";
cout<<"\tThe Branch location is :"<<branch<<"\n\n";
cout<<"\tAccount number :"<<accountNumber<<"\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";
cout<<"Press any key to Return to the Main Menu\n\n";
system("PAUSE");
}

void ATMAccountHolders::accountExit()
{
system("cls");

19
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB
2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ ATM ACCOUNT EXIT
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";

cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\n\n";
system("PAUSE");
exit(1);
}

class Limits:public Bank //child class inherited by base class - Bank


{
public:
void SetLimit(double NewLimit)
{}

double Getlimit()
{}

};

int main()
{
int e;
ATMAccountHolders p;

system ("Color 5f");

20
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB
2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\ WELCOME TO ATM
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
cout<<"\t\t\t--------------------\n"<<endl;
//Prompt to show today's date
cout << "\t\tCurrent date : ";
//Show date and time function
time_t now;
time(&now);

cout<<("%s\n", ctime(&now));;
//Give space for the function of date and time
cout<<"\t\t\t--------------------\n"<<endl;

cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\n\n";

cout<<"\tPress 1 and Then Press Enter to Access Your Account Via Pin
Number\n\n";
cout<<"\t\t\t\t\t or \n\n";
cout<<"\tPress 0 and press Enter to get Help.\n\n";

int access;
cin>>access;
switch(access)
{
case 1://pin to access account
system("cls");int i, pin;

21
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\n\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB
2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2 ATM ACCOUNT
ACCESS
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2
\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
cout<<"\n\nEnter Your Acc Pin Access Number! [Only one attempt is
allowed]\n\n"<<endl;

cout<<"\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\x
B2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\xB2\n\n";
cin>>pin;

system("cls");

if(pin==12345)

{
system("cls");

do
{
system("cls");

cout << endl <<


"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM Main Menu Screen
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n" << endl << endl;
cout << "\t\tEnter [1] To Deposit Cash" << endl;
cout << "\t\tEnter [2] To Withdraw Cash" << endl;

22
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout << "\t\tEnter [3] To Balance Inquiry" << endl;


cout << "\t\tEnter [4] To Pay Bills" << endl;
cout << "\t\tEnter [5] to Pay Account Interest" << endl;
cout << "\t\tEnter [0] to Exit ATM" << endl << endl;
cout << "\tPLEASE ENTER A SELECTION AND PRESS RETURN KEY: \n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
n\n";

cin>>e;
switch(e)
{
case 1:
p.deposit();
break;
case 2:
p.withdraw();
break;
case 3:
p.details();
break;
case 4:
p.payBills();
break;
case 5:
p.interest();
break;
case 0:
p.accountExit();
break;
default:cout<<"Please Enter the Correct Number Choice"<<endl;

23
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

}
}while(e!=0);

break;
}

else
{
system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb THANK YOU
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
cout<<"\nYou had made your attempt which failed!!! No More attempts
allowed!! Sorry!!\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";

system("PAUSE");
exit (1);
}

case 0://pin to access account


system("cls");

cout<<"\n\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xd
b\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb ATM ACCOUNT STATUS
\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb
\xdb\xdb\xdb\xdb\xdb\xdb\n\n";

24
REPORT ON ATM MACHINE OBJECT ORIENTED PROGRAMMING (OOP)

cout<<"\tYou must have the correct pin number to access this


acount. See your\n\n";
cout<<"\t bank representative for assistance during bank opening
hours\n\n";
cout<<"\t\tThanks for, your choice today!!\n\n";

cout<<"\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\
xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\xdb\n\n";
system ("PAUSE");
exit(1);
break;

system("PAUSE");
return 0;

};

25

You might also like