Explain each part of the Pseudocode below:   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

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Explain each part of the Pseudocode below:

 

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

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education