How to expplain this pseudo code? START Public Class BankingSystem Declarations string accname double balance = 0 int pin, userpin, newpin void create() void dispbalance() void withdraw() void pinchange() void deposit() EndClass void BankingSystem::create print “Enter Your Name: ” Cin.ignore Getline(cin, accname) print “Enter Your Pin: “ Input user pin Void BankingSystem::pinchange print “Input old Pin: “ Input userpin If (pin == userpin) print “Enter new pin: “ Input newpin pin = newpin print “Your pin was successfully changed” Else print “Please re-enter old pin” void BankingSystem::dispbalance print “Enter your pin: “ Input userpin If (pin == userpin) print “This is your correct balance: $” print balance else print “Please enter your correct pin” void BankingSystem::withdraw double WithIn print “Enter your pin: “ Input userpin If (pin == userpin) print “How much do you want to withdraw?” Input WithIn If (Within <= balance) balance -= within else print “You don’t have enough balance” else print “Please enter correct pin” void BankingSystem::deposit double DepIn print "Enter Your Pin: " Input userpin If (pin==userpin) print “How much do you want to deposit?” Input DepIn balance += DepIn else print “Please enter your correct pin” int main BankingSystem system int selection while (selection != 6) print “Welcome “ system.accname “ to north West Bank” print “********SELECT******** " print “1. Create a New Account” print “2. Check Balance” print “3. Withdraw” print “4. Deposit” print “5. Change Pin” print “6. Exit” print “Select a number for the desired action:” Input selection switch (selection) case 1: system.create break case 2: system.dispbalance break case 3: system.withdraw break case 4: system.deposit break case 5: system.pinchange break case 6: print “Thank you for using Northwest Bank!” print “Please come again default: print “Please Pick a valid option" endl return 0 END
How to expplain this pseudo code?
START
Public Class BankingSystem
Declarations
string accname
double balance = 0
int pin, userpin, newpin
void create()
void dispbalance()
void withdraw()
void pinchange()
void deposit()
EndClass
void BankingSystem::create
print “Enter Your Name: ”
Cin.ignore
Getline(cin, accname)
print “Enter Your Pin: “
Input user pin
Void BankingSystem::pinchange
print “Input old Pin: “
Input userpin
If (pin == userpin)
print “Enter new pin: “
Input newpin
pin = newpin
print “Your pin was successfully changed”
Else
print “Please re-enter old pin”
void BankingSystem::dispbalance
print “Enter your pin: “
Input userpin
If (pin == userpin)
print “This is your correct balance: $”
print balance
else
print “Please enter your correct pin”
void BankingSystem::withdraw
double WithIn
print “Enter your pin: “
Input userpin
If (pin == userpin)
print “How much do you want to withdraw?”
Input WithIn
If (Within <= balance)
balance -= within
else
print “You don’t have enough balance”
else
print “Please enter correct pin”
void BankingSystem::deposit
double DepIn
print "Enter Your Pin: "
Input userpin
If (pin==userpin)
print “How much do you want to deposit?”
Input DepIn
balance += DepIn
else
print “Please enter your correct pin”
int main
BankingSystem system
int selection
while (selection != 6)
print “Welcome “ system.accname “ to north West Bank”
print “********SELECT******** "
print “1. Create a New Account”
print “2. Check Balance”
print “3. Withdraw”
print “4. Deposit”
print “5. Change Pin”
print “6. Exit”
print “Select a number for the desired action:”
Input selection
switch (selection)
case 1: system.create
break
case 2: system.dispbalance
break
case 3: system.withdraw
break
case 4: system.deposit
break
case 5: system.pinchange
break
case 6:
print “Thank you for using Northwest Bank!”
print “Please come again
default:
print “Please Pick a valid option"
endl
return 0
END
Step by step
Solved in 2 steps