GithubHelp home page GithubHelp logo

simple-atm-controller's Introduction

simple-ATM-controller

Implementation of Custom Task for Code Tests.

Structure

simple-ATM-controller 
├── ATMAccounts.db 	# user accounts database
├── db_manager.py	# for db-management or monitor
├── main.py			# main routine for this task
├── module			# backend modules
│   ├── backend.py	# simple-atm-controller structure & methods
│   ├── database.py # database structure & methods
│   └── __init__.py
└── README.md

Guide

main.py

  1. Main Screen

    ======================================
    	Wellcome to					
    	Simple ATM Controller		
    ======================================
    jointed accounts:3
    
    Access via
    1. Card Number
    
    If you don't have any account,
    2. New Account
    
    3. Exit
    
    >>
  2. Access via Card Number

    • 2-1. When you enter '1', you can access your account using card_id & pin_number

      >>1
      insert card number: 3020
      pin_number: 1111
    • 2-2. And then, choose which you want to transaction with(enter the account id). you can do the three things(See balance, Deposit, Withdraw).

      =======Select_A_Account========
      0. account: cun	id: 420538
      -
      1. account: cun2	id: 405739
      -
      2. account: cun3	id: 487215
      -
      3. account: cun4	id: 419802
      -
      4. account: cun6	id: 802593
      -
      ===============================
      enter account_id
      >>802593
      Choose What you want to
      1. See balance
      2. Deposit
      3. WithDraw
      >>
      • See Balance

        >>1
        balance: $10
      • Deposit

        >>2
        balance: $10
        how much do you want to deposit?
        >>10
        $10 deposited. balance: $20
      • Withdraw

        >>3
        balance: $20
        how much do you want to withdraw?
        >>10
        $10 withdrawed. balance: $10
  3. Create New Account

    • When you have a card already, enter 'y' for your connection w/ your other accounts.

      >>2
      Do you have a card?(y/n)
      >y
      card_id: 3020
      pin_number: 1111
      account_name: cun7
      initial deposit: 10
      -
      name: cun7	accound_id: 164171
      card_id: 3020	balance: 10
      new account created.
       you should keep the card number.
      -
      • please, keep your card_id !!! if you couldn't remember, you can see on the db_manager.
    • If you don't have any account, enter 'n'

      >>2
      Do you have a card?(y/n)
      >n
      account_name: cun8
      pin_number: 1111
      pin_number confirm: 1111
      initial deposit: 10
      - 
      name: cun8	accound_id: 241330
      card_id: 2189	balance: 10
      new account created.
       you should keep the card number.
      • please, keep your card_id !!!

db_manager.py

It is not for normal user. for maintenance.

  1. Show DB Table

    1. db_table, 2. delete_account, 3. exit
    >1
    ======================ACCOUNTS TABLE========================
    0. account: cun	 id: 420538	 card_id: 3020	 balance: $30	
    1. account: cun2	 id: 405739	 card_id: 3020	 balance: $10	
    2. account: cun3	 id: 487215	 card_id: 3020	 balance: $50	
    3. account: cun4	 id: 419802	 card_id: 3020	 balance: $50	
    4. account: cun5	 id: 199195	 card_id: 3020	 balance: $50	
    5. account: cun6	 id: 802593	 card_id: 3020	 balance: $10	
    ============================================================
  2. Delete Account

    1. db_table, 2. delete_account, 3. exit
    >2
    plz type the account_id what you want to delete
    >199195
    1. db_table, 2. delete_account, 3. exit
    >1
    ======================ACCOUNTS TABLE========================
    0. account: cun	 id: 420538	 card_id: 3020	 balance: $30	
    1. account: cun2	 id: 405739	 card_id: 3020	 balance: $10	
    2. account: cun3	 id: 487215	 card_id: 3020	 balance: $50	
    3. account: cun4	 id: 419802	 card_id: 3020	 balance: $50	
    4. account: cun6	 id: 802593	 card_id: 3020	 balance: $10	
    ============================================================

simple-atm-controller's People

Contributors

cun-bjy avatar

Stargazers

 avatar

Watchers

 avatar

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.