Programming Code for ATM Machine

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now

The below UML Diagram it describes how a simple ATM Machine works. The customer must pass authentication before withdrawing money. UML diagrams help visualize and illustrate the whole project before the programmer can start working on the project (Milovan
evi et al., 2019). The codding part and the development process will stay on track following all the features that the system is supposed to have:

  • Authentication is performed by checking a PIN.
  • The PIN can be correct or not.
  • Unsuccessful attempts are counted.
  • If the counter exceeds a limit, then the customer is rejected.
  • If the account balance is zero, then the account is closed.
Code explains simply how the program works

The below python Code explains simply how the program works. First a customer enters a card. Then the machine prompts the user for a pin. The Machine offers withdrawal and deposit services. Python as a programming language is easy to learn and use to develop system softwares for clients in different sectors of the computing word (Hao & Ho, 2019). The python code is as below:

print(Welcome to MY Bank ATM)
restart = Yes
chances = 3
balance = 40000.64
while chances >= 0:
pin = int(input(nPlease Enter Your 4 Digit Pin: n))
if pin == 1234:
print(You entered your pin correctly)
while restart not in (n, no, N, NO):
print(nPlease Press 1 for your balance)
print(Please Press 2 to make withdrawal)
print(Please Press 3 to pay in)
print(Please Press 4 to return cardn)
option = int(input(What option would you like to choose? n))
if option == 1:
print(fYour Account Balance is N{balance}n)
restart = input(Would you like to do another transaction? n)
if restart in (n, no, N, NO):
print(Thank you)

break
elif option == 2:
option_2 = y
withdrawal = float(input(How much would you like to withdraw? n$500, $1000, $2000, $5000, $10,000, $20,000: n))
if withdrawal in [500, 1000, 2000, 5000, 10000, 20000]:
balance = balance  withdrawal
print(fYour balance is now ${balance}n)
restart = input(Would you like to do another transaction? )
if restart in (n, no, N, NO):
print(Thank you)

break
elif withdrawal != [500, 1000, 2000, 5000, 10000, 20000]:
print(Invalid amount, Please Retry)
restart = y
elif withdrawal == 1:
withdrawal = float(input(Please Enter Desired Amount: ))
elif option == 3:
pay_in = float(input(How much would you like to pay in? ))
balance = balance + pay_in
print(fYour balance now is N{balance}n)
restart = input(Would you like to do another transaction? )
if restart in (n, no, N, NO):
print(Thank you)

break
elif option == 4:
print(Please wait whilst your card is returned&n)
print(Thank you for your servicen)

break
else:
print(Please enter a correct number. n)
restart = y
elif pin != 1234:
print(Incorrect Password.)
chances = chances  1
if chances == 0:
print(No more tries)
break

The program works as explained above. Complex ATM software may include databases, network sockets but the above program implements its functionality.

References

Hao, J., & Ho, T. K. (2019). Machine learning made easy: a review of scikit-learn package in python programming language. Journal of Educational and Behavioral Statistics, 44(3), 348-361. Web.

Milovan
evi, M., Marinovi, J. S., Nikoli, J., Kiti, A., Shariati, M., Trung, N. & Khorami, M. (2019). UML diagrams for dynamical monitoring of rail vehicles. Physica A: Statistical Mechanics and its Applications, 531, 121169. Web.

Need help with assignments?

Our qualified writers can create original, plagiarism-free papers in any format you choose (APA, MLA, Harvard, Chicago, etc.)

Order from us for quality, customized work in due time of your choice.

Click Here To Order Now