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...
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...
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...
Create a Visual Studio console project (c++) containing a main() program that declares a const int...
Create a Visual Studio console project (c++) containing a main() program that declares a const int NUM_VALUES denoting the array size. Then declare an int array with NUM_VALUES entries. Using a for loop, prompt for the values that are stored in the array as follows: "Enter NUM_VALUES integers separated by blanks:" , where NUM_VALUES is replaced with the array size. Then use another for loop to print the array entries in reverse order separated by blanks on a single line...
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
USING VISUAL STUDIO 2017, LANGUAGE VISUAL C# I have struggled on this program for quite some...
USING VISUAL STUDIO 2017, LANGUAGE VISUAL C# I have struggled on this program for quite some time and still can't quite figure it out. I'm creating an app that has 2 textboxes, 1 for inputting customer name, and the second for entering the number of tickets the customer wants to purchase. There are 3 listboxes, the first with the days of the week, the second with 4 different theaters, and the third listbox is to display the customer name, number...
Language: c++ using visual basic Write a program to open a text file that you created,...
Language: c++ using visual basic Write a program to open a text file that you created, read the file into arrays, sort the data by price (low to high), by box number (low to high), search for a price of a specific box number and create a reorder report. The reorder report should alert purchasing to order boxes whose inventory falls below 100. Sort the reorder report from high to low. Inventory data to input. Box number Number boxes in...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT