Question
Create a application ATM basic application in Visual Basic..
Create a ATM Machine. It will have all the basic functions of a ATM like a login, balance, deposit, withdraw, continue to dep
0 0
Add a comment Improve this question Transcribed image text
Answer #1


Class ATM
Public balance As Double
Public pin As Integer
Public Sub New(p As Integer)
balance = 10000 'Assume you have 10000 in your account
pin = p
End Sub

Public Function login()
Dim p As Integer = 1234 'stored pin of your account & can change if want
Dim status As Boolean
If (p = pin) Then
status = True
Else
status = False
End If
login = status
End Function


Public Sub deposit(amount As Double)
balance = balance + amount
End Sub

Public Sub withdraw(amount As Double)
balance = balance - amount
End Sub

Public Sub showBalance()
Console.WriteLine("Balance : " & balance)
End Sub
Public Sub logOut()
Console.WriteLine("Thank you !!")
Console.ReadKey()
End
End Sub


End Class

Module Module1

Sub Main()
Dim pin As Integer
Console.Write("Enter Pin : ")
pin = Convert.ToInt32(Console.ReadLine())

Dim bank As New ATM(pin)
Dim choice As Integer
If (bank.login() = True) Then

Console.WriteLine("1. Deposit")
Console.WriteLine("2. Withdraw")
Console.WriteLine("3. Balance")
Console.WriteLine("4. Logout")

While (True)
Console.Write("Enter your choice : ")
choice = Convert.ToInt32(Console.ReadLine())

Select Case choice
Case 1
Dim amount As Integer
Console.Write("Enter amount to deposit : ")
amount = Convert.ToInt32(Console.ReadLine())
bank.deposit(amount)
Case 2
Dim amount As Integer
Console.Write("Enter amount to withdraw : ")
amount = Convert.ToInt32(Console.ReadLine())
bank.withdraw(amount)
Case 3
bank.showBalance()
Case 4
bank.logOut()
Case Else
Console.WriteLine("Please enter valid option ")
End Select

End While
Else
Console.WriteLine("Wrong pin")
End If
Console.ReadKey()
End Sub

End Module

Add a comment
Know the answer?
Add Answer to:
Create a application ATM basic application in Visual Basic.. Create a ATM Machine. It will have...
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
  • Create a ATM Machine. It will have all the basic functions of a ATM like a login, balance, deposi...

    Create a application ATM basic application in Visual Basic.. Create a ATM Machine. It will have all the basic functions of a ATM like a login, balance, deposit, withdraw, continue to deposit, and to log out. Create a ATM Machine. It will have all the basic functions of a ATM like a login, balance, deposit, withdraw, continue to deposit, and to log out.

  • PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use...

    PLEASE USE VISUAL BASIC* BY VISUAL STUDIO. Visual Basic INTERMEDIATE Create a Windows Forms application. Use the following names for the project and solution, respectively: Chopkins Project and Chopkins Solution. Save the application in the VB2017\Chap03 folder. Change the form file's name to Main Form.vb. Change the form's name to frmMain. Create the interface shown in Figure 3-37. The interface contains six labels, three text boxes, and two buttons. The application calculates and displays the total number of packs ordered...

  • Write a Java application that handles multiple ATM transactions (withdraw, deposit) at the same time. Create...

    Write a Java application that handles multiple ATM transactions (withdraw, deposit) at the same time. Create an Account class and implement both deposit and withdraw operations. Synchronize the operations to allow thread synchronization. Use Java Runnable interface to implement a Transaction class. Perform withdraw and deposit operations in run method. Create an AccountTest class to test multiple transactions (threads). Use an ArrayList to create a list of three or more Transaction objects. Use method execute of ExecutorService to execute the...

  • Visual C# Create Present Value application Application that lets you deposit a certain amount of money...

    Visual C# Create Present Value application Application that lets you deposit a certain amount of money into a savings account and then leave it alone to draw interest for the next 10 years. At the end of 10 years you would like to have $10,000 in the account. How much do you need to deposit today to make that happen? You can use the following present-value formula, to find out. P =F/(1+r)^n P is the present value, or the amount...

  • how can i code this only using a textbox for results Create Windows Forms applications called...

    how can i code this only using a textbox for results Create Windows Forms applications called ATM Project that allows the customer to deposit the initial amount and enter the amount to be withdrawn. You need to display the total amount in the account, dispenses the money to the customer, and debits the account by the amount withdrawn including any service charges. The ATM allows a customer to withdraw a maximum of $500 per transition in $20 increments. If a...

  • Visual Basic You are asked to develop a Visual Basic Net application that can determine roots...

    Visual Basic You are asked to develop a Visual Basic Net application that can determine roots of a requirements of this project are as follows: 1) Design a form to allow users to define a quadratic equation and to find the roots of the equation. The form should have a label that shows this message: Solving a quadratic equation ax2+bx+c=0 The form should have three textboxes in which users enter the values of a, b, and c The form should...

  • please help me finish this, it is for Visual Basic . net in Visual studio 2010...

    please help me finish this, it is for Visual Basic . net in Visual studio 2010 (show pictures of code and of the form please) Lab #5 - Banking Account with Methods Submit Assignment Download Work file Download Runtime Be sure to include comments at the top of each procedure and at the top of the file. Be sure to use meaningful names for all buttons and labels. In this lab you will create a simple banking application that will...

  • ATM MACHINE

    Kindly help me In this assignment you will create a RMI based system that allows a user to do the following: 1) Create a bank account by supplying a user id and password. 2) Login using their id and password. 3) Quit the program. Main Manu of ATM service window *Separate remote methods will be created for all of these functionalities. ->To create account see output below Hi! Welcome to  ATM Machine! Please select an option from the menu below: l -> Loginc -> Create New Account q -> Quit > c...

  • 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...

  • Create any Application which have the following features:- - Register and Login - Use any 2...

    Create any Application which have the following features:- - Register and Login - Use any 2 Jquery Plugin - Provide a link to a Basic calculator - Pattern Validation -Reading Data from Json File

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
ADVERTISEMENT