Coder Social home page Coder Social logo

javascript_atm's Introduction

ATM LAB

###Goal:

  • This lab will help you practice JavaScript functions and manipulating the DOM. You'll be selecting elements, manipulating HTML, and manipulating style along with building out the logic using JavaScript.

To do:

  • Keep track of the checking and savings balances somewhere
  • Add functionality so that a user can deposit money into one of the bank accounts.
  • Make sure you are updating the display and manipulating the HTML of the page so a user can see the change.
  • Add functionality so that a user can withdraw money from one of the bank accounts.
  • Make sure you are updating the display and manipulating the HTML of the page so a user can see the change.
  • Make sure the balance in an account can't go negative. If a user tries to withdraw more money than exists in the account, ignore the transaction.
  • When the balance of the bank account is $0 the background of that bank account should be red. It should be gray when there is money in the account.
  • What happens when the user wants to withdraw more money from the checking account than is in the account? These accounts have overdraft protection, so if a withdrawal can be covered by the balances in both accounts, take the checking balance down to $0 and take the rest of the withdrawal from the savings account. If the withdrawal amount is more than the combined account balance, ignore it.
  • Make sure there is overdraft protection going both ways.
  • Are there ways to refactor your code to make it DRYer?

####Note: There are some basic click events included in this lab that you may not have learned about yet. The setup code for all the events that you will need has been provided in the student code and commented.

javascript_atm's People

Contributors

clearf avatar cmwright33 avatar phlco 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.