Question

BANK ATM application program in JAVASCRIPT, that allows the user to manage transaction data. like withdraw,deposit,etc....

BANK ATM application program in JAVASCRIPT, that allows the user to manage transaction data. like withdraw,deposit,etc. Make sure it produces tabular feedback to the user. (meaning user should be able to enter a quanity let's say $20 withdrawal and balance of $100, so it's balance will be $80..As well to deposit money and add the balance to that deposit. Finally to show (-) signs if balance is overdraw,,,Program reads input from the user though the web page., any help is appraciate it. thanks

alert('Welcome to myATM!', 'Automatic Teller Machine');

'How much would you like to deposit?'

How much would you like to withdrawal?

Please take your money now..Thanks for your using my ATM,

Program uses two or more JavaScript library objects

Program reads input from the user though the web page,

Program uses two or more JavaScript library objects

One or more of the program’s user-defined methods accept one or more arguments, or returns a value

Problem statement clearly describes the program to be developed, states its benefits, and explains the programming concepts needed to build the program

0 0
Add a comment Improve this question Transcribed image text
Answer #1
<h1>ATM</h1>
<form id="atm" action="#" method="post">
  <select name="choice" id="choice">
                <option selected>-- select choice --</option>
                <option value="deposit">deposit</option>
                <option value="withdrawal">withdrawal</option>
        </select>
        <input type="text" id="amount" name="amount" placeholder="amount">
        <input id="submit" type="submit" value="submit">
</form>
<p id="balance">balance: $0.0</p>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

<script>
        $(function() {

                var balance                     =       0.0,
                                amountInput     =       $('#amount'),
                                balanceArea     =       $('#balance'),
                                choiceSelect  =         $('#choice'),
                                submitBtn       =       $('#submit'),
                                atmForm         =       $('#atm');

                function do_transaction(action) {

                        var amount = parseFloat(amountInput.val());

                        if (isNaN(amount) || amount === '') {
                                balanceArea.text('incorrect or wrong ');
                        } else {
                                if(action === 'deposit') {
                                        balance += amount;
                                } else if (action === 'withdrawal') {
                                        balance -= amount;
                                }
                                balanceArea.text('balance: $'+balance);
                        }
                }

                atmForm.submit(function() {

                        var choice = choiceSelect.val();

                        if (choice === 'deposit') {
                                do_transaction(choice);
                        } else if (choice === 'withdrawal') {
                                do_transaction(choice);
                        }
                        return false;
                });

                amountInput.hide();
                submitBtn.hide();

                choiceSelect.change(function() {

                        var choice = choiceSelect.val();

                        if (choice === 'deposit' || choice === 'withdrawal') {
                                amountInput.show().val('');
                                submitBtn.show();
                        } else {
                                amountInput.hide().val('');
                                submitBtn.hide();
                        }
                });
        });
</script>
Add a comment
Know the answer?
Add Answer to:
BANK ATM application program in JAVASCRIPT, that allows the user to manage transaction data. like withdraw,deposit,etc....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • This interactive program focuses on if/else statements, Scanner, and returning values. Turn in a file named...

    This interactive program focuses on if/else statements, Scanner, and returning values. Turn in a file named Budgeter.java. To use a Scanner for console input, you must import java.util.*; in your code. This program prompts a person for income and expense amounts, then calculates their net monthly income. Below are two example logs of execution from the program. This program’s behavior is dependent on the user input (user input is bold and underlined below to make it stand out and differentiate...

  • 1- TigerOne Bank is a local bank that intends to install a new automated teller machine...

    1- TigerOne Bank is a local bank that intends to install a new automated teller machine (ATM) to allow its customers to perform basic financial transactions. Using the ATM machine users should be able to view their account balance, withdraw cash and deposit funds. The bank wants you to develop the software application that will be installed on the new ATM machines. The following are the requirements for the application:  Users are uniquely identified by an account number and...

  • C++ Design a class bankAccount that defines a bank account as an ADT and implements the...

    C++ Design a class bankAccount that defines a bank account as an ADT and implements the basic properties of a bank account. The program will be an interactive, menu-driven program. a. Each object of the class bankAccount will hold the following information about an account: account holder’s name account number balance interest rate The data members MUST be private. Create an array of the bankAccount class that can hold up to 20 class objects. b. Include the member functions to...

  • This interactive program focuses on if/else statements, Scanner, and returning values. Turn in a file named...

    This interactive program focuses on if/else statements, Scanner, and returning values. Turn in a file named Budgeter.java. To use a Scanner for console input, you must import java.util.*; in your code. This program prompts a person for income and expense amounts, then calculates their net monthly income. Below are two example logs of execution from the program. This program’s behavior is dependent on the user input (user input is bold and underlined below to make it stand out and differentiate...

  • Purpose: Demonstrate the ability to create and manipulate classes, data members, and member functions. This assignment...

    Purpose: Demonstrate the ability to create and manipulate classes, data members, and member functions. This assignment also aims at creating a C++ project to handle multiple files (one header file and two .cpp files) at the same time. Remember to follow documentation and variable name guidelines. Create a C++ project to implement a simplified banking system. Your bank is small, so it can have a maximum of 100 accounts. Use an array of pointers to objects for this. However, your...

  • Read this article. Then write a 250 word response on two of the programs you like...

    Read this article. Then write a 250 word response on two of the programs you like the most. Open source business intelligence software 1. BIRT BIRT is an open source BI program that CloudTweaks says is often viewed as the industry standard. BIRT boasts “over 12 million downloads and over 2.5 million developers across 157 countries.” Its users include heavyweights such as Cisco, S1, and IBM (which is also a BIRT sponsor). They also have maturity going for them, as...

  • Task The task for this assignment is to have the following user-defined data type: struct rgb...

    Task The task for this assignment is to have the following user-defined data type: struct rgb { unsigned char red; unsigned char green; unsigned char blue; }; be able to be: read in from a stream (e.g., std::cin), i.e., write: std::istream& operator >>(std::istream& is, rgb& colour); (see below) written out to a stream (e.g., std::cout), i.e., write: std::ostream& operator <<(std::ostream& os, rgb const& colour); (see below) stored in a container, e.g., std::vector<rgb>, std::array<rgb,16>; (see below) processed via algorithms (and other...

  • Code is in C# Your instructor would like to thank to Marty Stepp and Hélène Martin...

    Code is in C# Your instructor would like to thank to Marty Stepp and Hélène Martin at the University of Washington, Seattle, who originally wrote this assignment (for their CSE 142, in Java) This program focuses on classes and objects. Turn in two files named Birthday.cs and Date.cs. You will also need the support file Date.dll; it is contained in the starter project for this assignment. The assignment has two parts: a client program that uses Date objects, and a...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT