Question

In: Computer Science

Make a Program in Visual Studio / Console App (.NET Framework) # language Visual Basic You...

Make a Program in Visual Studio / Console App (.NET Framework)
# language Visual Basic

You will be simulating an ATM machine as much as possible

Pretend you have an initial deposit of 1000.00. You will

Prompt the user with a Main menu:

Enter 1 to deposit

Enter 2 to Withdraw

Enter 3 to Print Balance

Enter 4 to quit

When the user enters 1 in the main menu, your program will prompt the user to enter the deposit amount.

If the user enter more than 2000, Print "Deposit of more than $2000 is not allowed" and

Prompt the user with a SubMenu:

Enter 1 for the Main Menu. If user enters 1, display the main menu

Enter 0 to quit. If user enter 0, exit the application

if the user enters less than 2000,

Print "Deposit Transaction Successful" and

Add the amount to the Balance

Prompt the user with a SubMenu:

Enter 1 for the Main Menu. If user enters 1, display the main menu

Enter 0 to quit. If user enter 0, exit the application

When the user enters 2 in the main menu, your program will prompt the user to enter a withdraw amount.

If the user enter more than 200, Print "Withdrawing more than $200 is not allowed

Prompt the user with a SubMenu:

Enter 1 for the Main Menu. If user enters 1, display the main menu

Enter 0 to quit. If user enter 0, exit the application

If the user enter less than 200, Print "Withdraw Transaction Successful."

deduct the amount from the Balance

Prompt the user with a SubMenu:

Enter 1 for the Main Menu. If user enters 1, display the main menu

Enter 0 to quit. If user enter 0, exit the application

When the user enters 3 in the main menu, print the balance as "Your Current Balance = "

Prompt the user with a SubMenu:

Enter 1 for the Main Menu. If user enters 1, display the main menu

Enter 0 to quit. If user enter 0, exit the application

When the user enters 4 in the main menu, exit the application

When the user enters other than 1-4, print "Invalid Transaction Requested"

Here is the output of my program, with user entered numbers highlighted in yellow

Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit
1
Enter the amount to Deposit
3000
Deposit More than $2000 is not allowed
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit
1
Enter the amount to Deposit
1999
Deposit Transaction successful
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit

3
Your Current Balance =2999
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit
2
Enter the amount to Withdraw
250
Withdrawing More than $200 is not allowed
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit
2
Enter the amount to Withdraw
150
Withdraw Transaction successful
Enter 1 to Main Menu
Enter 2 to Quit

1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit
3
Your Current Balance =2849
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit

5
Invalid Transaction requested
Enter 1 to Main Menu
Enter 2 to Quit
1
Enter 1 for Deposit
Enter 2 for Withdraw
Enter 3 for Print Balance
Enter 4 for Quit

4

Solutions

Expert Solution

input code:

output:

code:

Imports System.Console
Module VBModule
Sub Main()
' initialize the variables
Dim ch1 as Integer
Dim ch2 as Integer
Dim amount as Integer
ch1=0
ch2=1
amount=1000
  
do
'print menu
Console.WriteLine("Enter 1 to deposit")
Console.WriteLine("Enter 2 to Withdraw")
Console.WriteLine("Enter 3 to print Balance")
Console.WriteLine("Enter 4 to quit")
'take user input
ch1=Console.ReadLine()
select case ch1
case 1
'for Deposit
'take amount input
Console.WriteLine("Enter the amount to Deposit")
Dim deposit as Integer
deposit=Console.ReadLine()   
if deposit>2000 then
  
'print this if amount >2000
Console.WriteLine("Deposit More than $2000 is not allowed")
else
'else update amount and print successful
amount=amount+deposit
Console.WriteLine("Deposit Transaction successful")
end if
  
case 2
'for Withdraw
'take user input
Console.WriteLine("Enter the amount to Withdraw")
Dim Withdraw as Integer
withdraw=Console.ReadLine()
if withdraw>200 then
'print this is greater than >200
Console.WriteLine("Withdrawing More than $200 is not allowed")
else
'else print this
if amount-withdraw>0 then
'if Withdraw don't go amount<0 than print this
amount=amount-withdraw
Console.WriteLine("Withdraw Transaction successful")
else
  
Console.WriteLine("Not Enough Money for Withdraw")
end if
end if
case 3
'print Balance
Console.WriteLine("Your Current Balance ={0}",amount)
case 4
'terinate the program
System. Environment. Exit(0)
case else
'print Invalid Transaction
Console.WriteLine("Invalid Transaction Requested")
end select
'print sub menu
Console.WriteLine("Enter 1 for Main Menu")
Console.WriteLine("Enter 2 for Quit")
'take user input
ch2=Console.ReadLine()
loop while ch2=1
End Sub
End Module


Related Solutions

1. Make a Console App (.NET Core) in Visual Studio and name it as A1YourFirstnameLastname. 2....
1. Make a Console App (.NET Core) in Visual Studio and name it as A1YourFirstnameLastname. 2. Implement a vehicle rental management system which is capable of doing the following: • View all, available and reserved vehicles. • Reserve vehicle or cancel a reservation. 3. The application must be menu-based app: 1 - View all vehicles 2 - View available vehicles 3 - View reserved vehicles 4 - Reserve a vehicle 5 - Cancel reservation 6 - Exit 4. NOTE: At...
Make a Console application Language should be Visual Basic In this assignment, you will be calculating...
Make a Console application Language should be Visual Basic In this assignment, you will be calculating the two parts for each month. you calculate the interest to pay each month and principal you pay every month. The interest you pay every month = loan * monthlyInterest The principal you pay every month = monthlyMortgage -  interest you pay every month ' what is my remaining loan loan = loan - principal you pay every month Problem 1 : Using While Loop,...
Make a Console application Language should be Visual Basic You will be simulating an ATM machine...
Make a Console application Language should be Visual Basic You will be simulating an ATM machine as much as possible Pretend you have an initial deposit of 1000.00. You will Prompt the user with a Main menu: Enter 1 to deposit Enter 2 to Withdraw Enter 3 to Print Balance Enter 4 to quit When the user enters 1 in the main menu, your program will prompt the user to enter the deposit amount. If the user enter more than...
Write a C program The Visual Studio project itself must make its output to the Console...
Write a C program The Visual Studio project itself must make its output to the Console (i.e. the Command Prompt using printf) and it must exhibit the following features as a minimum: 3%: Looping Menu with 3 main actions: View Cars, Sell Car, View Sales Note: A Car is defined by its price and model 3%: Must contain at least three arrays to record sales figures (maximum of 10 Car models) Two for recording the price and model of one...
1-Create a new Visual C# Console App (.NET Framework). Name the solution "GPA Calculation". 2-Zip and...
1-Create a new Visual C# Console App (.NET Framework). Name the solution "GPA Calculation". 2-Zip and Submit your entire project with the solution file GPA Ask the user to input their grade percentage (e.g. the use will enter 98 if they had an overall grade of 98% in their course) for their Accounting, Marketing, Economics and MIS courses. Assume each course is worth 3 credit hours. Once you have all of their grades output what letter grade they earned for...
Create a C# .NET Core Console project in Visual Studio. (This is the same kind of...
Create a C# .NET Core Console project in Visual Studio. (This is the same kind of project we have been doing all semester.) Do all of the following in the Program class. You do not need to add any other classes to this project. 2. If it exists, remove the Console.WriteLine(“Hello World!”); line that Visual Studio created in the Program class. 3. At the very top of the Program.cs page you should see using System; On the empty line below...
ONLY USE VISUAL STUDIO (NO JAVA CODING) VISUAL STUDIO -> C# -> CONSOLE APPLICATION In this...
ONLY USE VISUAL STUDIO (NO JAVA CODING) VISUAL STUDIO -> C# -> CONSOLE APPLICATION In this part of the assignment, you are required to create a C# Console Application project. The project name should be A3<FirstName><LastName>P2. For example, a student with first name John and Last name Smith would name the project A1JohnSmithP2. Write a C# (console) program to calculate the number of shipping labels that can be printed on a sheet of paper. This program will use a menu...
Use Visual Basic Language In this assignment you will need to create a program that will...
Use Visual Basic Language In this assignment you will need to create a program that will have both a “for statement” and an “if statement”. Your program will read 2 numbers from the input screen and it will determine which is the larger of the 2 numbers. It will do this 10 times. It will also keep track of both the largest and smallest numbers throughout the entire 10 times through the loop. An example of the program would be...
answer the following using C# Design and program a Visual Studio Console project in C# that...
answer the following using C# Design and program a Visual Studio Console project in C# that allows your user to enter a number. The program will examine the number to see if it is prime. If it is prime, it will print the next higher prime and the next lower primes to the console. If the number entered by the user is not prime, display a message to that effect. All code should be written by you. Do not copy/paste...
write a small visual basic console program to output the ages of three students
write a small visual basic console program to output the ages of three students
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT