Code Monkey home page Code Monkey logo

basic-atm's Introduction

Basic ATM

A basic ATM project where users can manage their bank account

Transactions

This ATM program has 4 basic functions :

  1. Deposit Money
  2. Withdraw Money
  3. Balance Inquiry
  4. Logout

Information

This ATM works by referencing the username as "patika" and the password as "dev123". If users enter one of the username or password incorrectly 3 times, they will block their accounts and terminate the program. The initial balance information of the users is set at $2800.

int right = 3;
        int balance = 2800;
        int select;
        while (right > 0) {
            System.out.println("Your Username: ");
            userName = input.nextLine();
            System.out.println("Your Password: ");
            password = input.nextLine();
            if (userName.equals("patika") && password.equals("dev123")) {
                System.out.println("Hello, Welcome to the Patika Bank...");
                do {
                    System.out.println("1- Deposit Money\n" + "2- Withdraw Money\n" + "3- Balance Inquiry\n" + "4- Logout");
                    System.out.print("Please select the banking transaction you want to do : ");
                    select = input.nextInt();
                    switch (select) {
                        case 1:
                            System.out.println("Enter the amount of money you want to deposit: ");
                            int deposit = input.nextInt();
                            balance += deposit;
                            break;
                        case 2:
                            System.out.println("Enter the amount of money you want to withdraw: ");
                            int withdraw = input.nextInt();
                            if (withdraw > balance) {

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.