in C# errors are in pics class Program {     static void Main(string[] args)     {         Bank myBank = new Bank();         // Adding bank accounts         BankAccount account1 = new BankAccount { AccountNumber = "001", AccountHolderName = "John Doe", Balance = 5000, AccountType = AccountType.Savings };         myBank.AddAccount(account1);         BankAccount account2 = new BankAccount { AccountNumber = "002", AccountHolderName = "Jane Smith", Balance = 10000, AccountType = AccountType.Current };         myBank.AddAccount(account2);         BankAccount account3 = new BankAccount { AccountNumber = "003", AccountHolderName = "Bob Johnson", Balance = 7500, AccountType = AccountType.Savings };         myBank.AddAccount(account3);         // Searching for an existing account and displaying its details         Console.WriteLine("Enter the account number to search: ");         string accountNumber = Console.ReadLine();         BankAccount foundAccount = myBank.SearchAccount(accountNumber);         if (foundAccount != null)         {             Console.WriteLine($"Account Number: {foundAccount.AccountNumber}");             Console.WriteLine($"Account Holder Name: {foundAccount.AccountHolderName}");             Console.WriteLine($"Account Type: {foundAccount.AccountType}");             Console.WriteLine($"Balance: {foundAccount.CheckBalance()}");         }         else         {             Console.WriteLine("Account not found.");         }         // Depositing an amount into an account         Console.WriteLine("Enter the account number to deposit into: ");         accountNumber = Console.ReadLine();         foundAccount = myBank.SearchAccount(accountNumber);         if (foundAccount != null)         {             Console.WriteLine("Enter the amount to deposit: ");             double amount;             while (!double.TryParse(Console.ReadLine(), out amount))             {                 Console.WriteLine("Invalid input. Please enter a number.");             }             foundAccount.Deposit(amount);             Console.WriteLine($"Deposit successful. New balance: {foundAccount.CheckBalance()}");         }         else         {             Console.WriteLine("Account not found.");         }         // Withdrawing an amount from an account         Console.WriteLine("Enter the account number to withdraw from: ");         accountNumber = Console.ReadLine();     foundAccount = myBank.SearchAccount(accountNumber);     if (foundAccount != null)     {         Console.WriteLine("Enter the amount to withdraw: ");         double amount;         while (!double.TryParse(Console.ReadLine(), out amount))         {             Console.WriteLine("Invalid input. Please enter a number.");         }         if (foundAccount.Withdraw(amount))         {             Console.WriteLine($"Withdrawal successful. New balance: {foundAccount.CheckBalance()}");         }         else         {             Console.WriteLine("Insufficient balance.");         }     }     else     {         Console.WriteLine("Account not found.");     }     // Searching for the account again and displaying the updated account details     Console.WriteLine("Enter the account number to search: ");     accountNumber = Console.ReadLine();     foundAccount = myBank.SearchAccount(accountNumber);     if (foundAccount != null)     {         Console.WriteLine($"Account Number: {foundAccount.AccountNumber}");         Console.WriteLine($"Account Holder Name: {foundAccount.AccountHolderName}");         Console.WriteLine($"Account Type: {foundAccount.AccountType}");         Console.WriteLine($"Balance: {foundAccount.CheckBalance()}");     }     else     {         Console.WriteLine("Account not found.");     }     // Removing an account     Console.WriteLine("Enter the account number to remove: ");     accountNumber = Console.ReadLine();     bool isRemoved = myBank.RemoveAccount(accountNumber);     if (isRemoved)     {         Console.WriteLine("Account removed successfully.");     }     else     {         Console.WriteLine("Account not found.");     }     // Testing additional functionality     // Input validation for adding an account     BankAccount account4 = new BankAccount { AccountNumber = "004", AccountHolderName = "Invalid Name", Balance = -1000, AccountType = (AccountType)99 };     myBank.AddAccount(account4);     // Input validation for depositing into an account     foundAccount = myBank.SearchAccount("002");     foundAccount.Deposit(-500);     // Input validation for withdrawing from an account     foundAccount = myBank.SearchAccount("003");     foundAccount.Withdraw(10000);     // Input validation for searching an account     foundAccount = myBank.SearchAccount("1000");     Console.ReadLine(); } }

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

in C# errors are in pics

class Program
{
    static void Main(string[] args)
    {
        Bank myBank = new Bank();

        // Adding bank accounts
        BankAccount account1 = new BankAccount { AccountNumber = "001", AccountHolderName = "John Doe", Balance = 5000, AccountType = AccountType.Savings };
        myBank.AddAccount(account1);

        BankAccount account2 = new BankAccount { AccountNumber = "002", AccountHolderName = "Jane Smith", Balance = 10000, AccountType = AccountType.Current };
        myBank.AddAccount(account2);

        BankAccount account3 = new BankAccount { AccountNumber = "003", AccountHolderName = "Bob Johnson", Balance = 7500, AccountType = AccountType.Savings };
        myBank.AddAccount(account3);

        // Searching for an existing account and displaying its details
        Console.WriteLine("Enter the account number to search: ");
        string accountNumber = Console.ReadLine();

        BankAccount foundAccount = myBank.SearchAccount(accountNumber);
        if (foundAccount != null)
        {
            Console.WriteLine($"Account Number: {foundAccount.AccountNumber}");
            Console.WriteLine($"Account Holder Name: {foundAccount.AccountHolderName}");
            Console.WriteLine($"Account Type: {foundAccount.AccountType}");
            Console.WriteLine($"Balance: {foundAccount.CheckBalance()}");
        }
        else
        {
            Console.WriteLine("Account not found.");
        }

        // Depositing an amount into an account
        Console.WriteLine("Enter the account number to deposit into: ");
        accountNumber = Console.ReadLine();

        foundAccount = myBank.SearchAccount(accountNumber);
        if (foundAccount != null)
        {
            Console.WriteLine("Enter the amount to deposit: ");
            double amount;
            while (!double.TryParse(Console.ReadLine(), out amount))
            {
                Console.WriteLine("Invalid input. Please enter a number.");
            }
            foundAccount.Deposit(amount);
            Console.WriteLine($"Deposit successful. New balance: {foundAccount.CheckBalance()}");
        }
        else
        {
            Console.WriteLine("Account not found.");
        }

        // Withdrawing an amount from an account
        Console.WriteLine("Enter the account number to withdraw from: ");
        accountNumber = Console.ReadLine();

    foundAccount = myBank.SearchAccount(accountNumber);
    if (foundAccount != null)
    {
        Console.WriteLine("Enter the amount to withdraw: ");
        double amount;
        while (!double.TryParse(Console.ReadLine(), out amount))
        {
            Console.WriteLine("Invalid input. Please enter a number.");
        }
        if (foundAccount.Withdraw(amount))
        {
            Console.WriteLine($"Withdrawal successful. New balance: {foundAccount.CheckBalance()}");
        }
        else
        {
            Console.WriteLine("Insufficient balance.");
        }
    }
    else
    {
        Console.WriteLine("Account not found.");
    }

    // Searching for the account again and displaying the updated account details
    Console.WriteLine("Enter the account number to search: ");
    accountNumber = Console.ReadLine();

    foundAccount = myBank.SearchAccount(accountNumber);
    if (foundAccount != null)
    {
        Console.WriteLine($"Account Number: {foundAccount.AccountNumber}");
        Console.WriteLine($"Account Holder Name: {foundAccount.AccountHolderName}");
        Console.WriteLine($"Account Type: {foundAccount.AccountType}");
        Console.WriteLine($"Balance: {foundAccount.CheckBalance()}");
    }
    else
    {
        Console.WriteLine("Account not found.");
    }

    // Removing an account
    Console.WriteLine("Enter the account number to remove: ");
    accountNumber = Console.ReadLine();

    bool isRemoved = myBank.RemoveAccount(accountNumber);
    if (isRemoved)
    {
        Console.WriteLine("Account removed successfully.");
    }
    else
    {
        Console.WriteLine("Account not found.");
    }

    // Testing additional functionality
    // Input validation for adding an account
    BankAccount account4 = new BankAccount { AccountNumber = "004", AccountHolderName = "Invalid Name", Balance = -1000, AccountType = (AccountType)99 };
    myBank.AddAccount(account4);

    // Input validation for depositing into an account
    foundAccount = myBank.SearchAccount("002");
    foundAccount.Deposit(-500);

    // Input validation for withdrawing from an account
    foundAccount = myBank.SearchAccount("003");
    foundAccount.Withdraw(10000);

    // Input validation for searching an account
    foundAccount = myBank.SearchAccount("1000");

    Console.ReadLine();
}

}
Error: Specified file could not be compiled.
e:\stef C# homework\New folder\program.cs(6,9): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(6,27): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(9,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(9,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(9,135): error CS0103: The name 'AccountType' does not exist in the current context
e:\stef C# homework\New folder\program.cs (12,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(12,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(12,138): error CS0103: The name 'AccountType' does not exist in the current context
e:\stef C# homework\New folder\program.cs(15,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(15,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(15,138): error CS0103: The name 'AccountType' does not exist in the current context
e:\stef C# homework\New folder\program.cs(19,9): error CS0103: The name 'Console' does not exist in the current context
e:\stef C# homework\New folder\program.cs(20,32): error CS0103: The name 'Console' does not exist in the current context
e:\stef C# homework\New folder\program.cs (22,9): error CS0246:
e:\stef C# homework\New folder\program.cs(25,13): error CS0103:
e:\stef C# homework\New folder\program.cs(26,13): error CS0103:
e:\stef C# homework\New folder\program.cs(27,13): error CS0103:
e:\stef C# homework\New folder\program.cs(28,13): error CS0103:
e:\stef C# homework\New folder\program.cs(32,13): error CS0103:
e:\stef C# homework\New folder\program.cs(36,9): error CS0103:
e:\stef C# homework\New folder\program.cs(37,25): error CS0103:
e:\stef C# homework\New folder\program.cs(42,13): error CS0103:
e:\stef C# homework\New folder\program.cs(44,37): error CS0103:
e:\stef C# homework\New folder\program.cs (46,17): error CS0103:
e:\stef C# homework\New folder\program.cs (49,13): error CS0103:
e:\stef C# homework\New folder\program.cs(53,13): error CS0103:
e:\stef C# homework\New folder\program.cs(57,9): error CS0103:
e:\stef C# homework\New folder\program.cs (58,25): error CS0103:
e:\stef C# homework\New folder\program.cs(63,9): error CS0103:
e:\stef C# homework\New folder\program.cs(65,33): error CS0103:
e:\stef C# homework\New folder\program.cs(67,13): error CS0103:
e:\stef C# homework\New folder\program.cs(71,13): error CS0103:
e:\stef C# homework\New folder\program.cs(75,13): error CS0103:
e:\stef C# homework\New folder\program.cs(80,9): error CS0103:
e:\stef C# homework\New folder\program.cs(84,5): error CS0103:
e:\stef C# homework\New folder\program.cs(85,21): error CS0103:
e:\stef C# homework\New folder\program.cs (90,9): error CS0103:
e:\stef C# homework\New folder\program.cs(91,9): error CS0103:
e:\stef C# homework\New folder\program.cs(92,9): error CS0103:
e:\stef C# homework\New folder\program.cs(93,9): error CS0103:
e:\stef C# homework\New folder\program.cs(97,9): error CS0103:
e:\stef C# homework\New folder\program.cs(101,5): error CS0103:
e:\stef C# homework\New folder\program.cs(102,21): error CS0103:
The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
Transcribed Image Text:Error: Specified file could not be compiled. e:\stef C# homework\New folder\program.cs(6,9): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(6,27): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(9,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(9,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(9,135): error CS0103: The name 'AccountType' does not exist in the current context e:\stef C# homework\New folder\program.cs (12,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(12,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(12,138): error CS0103: The name 'AccountType' does not exist in the current context e:\stef C# homework\New folder\program.cs(15,9): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(15,36): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(15,138): error CS0103: The name 'AccountType' does not exist in the current context e:\stef C# homework\New folder\program.cs(19,9): error CS0103: The name 'Console' does not exist in the current context e:\stef C# homework\New folder\program.cs(20,32): error CS0103: The name 'Console' does not exist in the current context e:\stef C# homework\New folder\program.cs (22,9): error CS0246: e:\stef C# homework\New folder\program.cs(25,13): error CS0103: e:\stef C# homework\New folder\program.cs(26,13): error CS0103: e:\stef C# homework\New folder\program.cs(27,13): error CS0103: e:\stef C# homework\New folder\program.cs(28,13): error CS0103: e:\stef C# homework\New folder\program.cs(32,13): error CS0103: e:\stef C# homework\New folder\program.cs(36,9): error CS0103: e:\stef C# homework\New folder\program.cs(37,25): error CS0103: e:\stef C# homework\New folder\program.cs(42,13): error CS0103: e:\stef C# homework\New folder\program.cs(44,37): error CS0103: e:\stef C# homework\New folder\program.cs (46,17): error CS0103: e:\stef C# homework\New folder\program.cs (49,13): error CS0103: e:\stef C# homework\New folder\program.cs(53,13): error CS0103: e:\stef C# homework\New folder\program.cs(57,9): error CS0103: e:\stef C# homework\New folder\program.cs (58,25): error CS0103: e:\stef C# homework\New folder\program.cs(63,9): error CS0103: e:\stef C# homework\New folder\program.cs(65,33): error CS0103: e:\stef C# homework\New folder\program.cs(67,13): error CS0103: e:\stef C# homework\New folder\program.cs(71,13): error CS0103: e:\stef C# homework\New folder\program.cs(75,13): error CS0103: e:\stef C# homework\New folder\program.cs(80,9): error CS0103: e:\stef C# homework\New folder\program.cs(84,5): error CS0103: e:\stef C# homework\New folder\program.cs(85,21): error CS0103: e:\stef C# homework\New folder\program.cs (90,9): error CS0103: e:\stef C# homework\New folder\program.cs(91,9): error CS0103: e:\stef C# homework\New folder\program.cs(92,9): error CS0103: e:\stef C# homework\New folder\program.cs(93,9): error CS0103: e:\stef C# homework\New folder\program.cs(97,9): error CS0103: e:\stef C# homework\New folder\program.cs(101,5): error CS0103: e:\stef C# homework\New folder\program.cs(102,21): error CS0103: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context
The name Console does not exist in the current context
The name 'Console' does not exist in the current context
The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
The name 'AccountType' does not exist in the current context
e:\stef C# homework\New folder\program.cs(107,9): error CS0103:
e:\stef C# homework\New folder\program.cs(111,9): error CS0103:
e:\stef C# homework\New folder\program.cs(116,5): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(116,32): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(116,137): error CS0246: The type or namespace name 'AccountType' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(130,5): error CS0103: The name 'Console' does not exist in the current context
e:\stef C# homework\New folder\program.cs(6,9): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(6,27): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs (9,9): error CS0246:
e:\stef C# homework\New folder\program.cs(9,36): error CS0246:
e:\stef C# homework\New folder\program.cs(9,135): error CS0103:
e:\stef C# homework\New folder\program.cs(12,9): error CS0246:
e:\stef C# homework\New folder\program.cs (46,17): error CS0103:
e:\stef C# homework\New folder\program.cs (49,13): error CS0103:
e:\stef C# homework\New folder\program.cs (53,13): error CS0103:
e:\stef C# homework\New folder\program.cs(57,9): error CS0103:
e:\stef C# homework\New folder\program.cs (58,25): error CS0103:
e:\stef C# homework\New folder\program.cs(63,9): error CS0103:
e:\stef C# homework\New folder\program.cs(65,33): error CS0103:
e:\stef C# homework\New folder\program.cs(67,13): error CS0103:
e:\stef C# homework\New folder\program.cs(71,13): error CS0103:
e:\stef C# homework\New folder\program.cs(75,13): error CS0103:
e:\stef C# homework\New folder\program.cs (80,9): error CS0103:
e:\stef C# homework\New folder\program.cs(84,5): error CS0103:
e:\stef C# homework\New folder\program.cs (85,21): error CS0103:
e:\stef C# homework\New folder\program.cs (90,9): error CS0103:
e:\stef C# homework\New folder\program.cs (91,9): error CS0103:
e:\stef C# homework\New folder\program.cs(92,9): error CS0103:
e:\stef C# homework\New folder\program.cs (93,9): error CS0103:
e:\stef C# homework\New folder\program.cs (97,9): error CS0103:
e:\stef C# homework\New folder\program.cs(101,5): error CS0103:
e:\stef C# homework\New folder\program.cs(102,21): error CS0103:
e:\stef C# homework\New folder\program.cs(107,9): error CS0103:
e:\stef C# homework\New folder\program.cs(111,9): error CS0103:
e:\stef C# homework\New folder\program.cs(116,5): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(116,32): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(116,137): error CS0246: The type or namespace name 'AccountType' could not be found (are you missing a using directive or an assembly reference?)
e:\stef C# homework\New folder\program.cs(130,5): error CS0103: The name 'Console' does not exist in the current context
The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?)
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
The name 'Console' does not exist in the current context
Transcribed Image Text:The name Console does not exist in the current context The name 'Console' does not exist in the current context The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) The name 'AccountType' does not exist in the current context e:\stef C# homework\New folder\program.cs(107,9): error CS0103: e:\stef C# homework\New folder\program.cs(111,9): error CS0103: e:\stef C# homework\New folder\program.cs(116,5): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(116,32): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(116,137): error CS0246: The type or namespace name 'AccountType' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(130,5): error CS0103: The name 'Console' does not exist in the current context e:\stef C# homework\New folder\program.cs(6,9): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(6,27): error CS0246: The type or namespace name 'Bank' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs (9,9): error CS0246: e:\stef C# homework\New folder\program.cs(9,36): error CS0246: e:\stef C# homework\New folder\program.cs(9,135): error CS0103: e:\stef C# homework\New folder\program.cs(12,9): error CS0246: e:\stef C# homework\New folder\program.cs (46,17): error CS0103: e:\stef C# homework\New folder\program.cs (49,13): error CS0103: e:\stef C# homework\New folder\program.cs (53,13): error CS0103: e:\stef C# homework\New folder\program.cs(57,9): error CS0103: e:\stef C# homework\New folder\program.cs (58,25): error CS0103: e:\stef C# homework\New folder\program.cs(63,9): error CS0103: e:\stef C# homework\New folder\program.cs(65,33): error CS0103: e:\stef C# homework\New folder\program.cs(67,13): error CS0103: e:\stef C# homework\New folder\program.cs(71,13): error CS0103: e:\stef C# homework\New folder\program.cs(75,13): error CS0103: e:\stef C# homework\New folder\program.cs (80,9): error CS0103: e:\stef C# homework\New folder\program.cs(84,5): error CS0103: e:\stef C# homework\New folder\program.cs (85,21): error CS0103: e:\stef C# homework\New folder\program.cs (90,9): error CS0103: e:\stef C# homework\New folder\program.cs (91,9): error CS0103: e:\stef C# homework\New folder\program.cs(92,9): error CS0103: e:\stef C# homework\New folder\program.cs (93,9): error CS0103: e:\stef C# homework\New folder\program.cs (97,9): error CS0103: e:\stef C# homework\New folder\program.cs(101,5): error CS0103: e:\stef C# homework\New folder\program.cs(102,21): error CS0103: e:\stef C# homework\New folder\program.cs(107,9): error CS0103: e:\stef C# homework\New folder\program.cs(111,9): error CS0103: e:\stef C# homework\New folder\program.cs(116,5): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(116,32): error CS0246: The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(116,137): error CS0246: The type or namespace name 'AccountType' could not be found (are you missing a using directive or an assembly reference?) e:\stef C# homework\New folder\program.cs(130,5): error CS0103: The name 'Console' does not exist in the current context The type or namespace name 'BankAccount' could not be found (are you missing a using directive or an assembly reference?) The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context The name 'Console' does not exist in the current context
Expert Solution
Step 1

Algorithm:

  1. Define the BankAccount class with the following attributes: AccountNumber, AccountHolderName, Balance, and AccountType.
  2. Define the Bank class with the following methods: AddAccount, SearchAccount, and RemoveAccount. This class should also have a list of BankAccount objects.
  3. Instantiate the Bank class.
  4. Create BankAccount objects for each account holder with their respective account details (AccountNumber, AccountHolderName, Balance, and AccountType).
  5. Add the BankAccount objects to the Bank object using the AddAccount method.
  6. Ask the user for an account number to search for using the SearchAccount method. If found, display the account details (AccountNumber, AccountHolderName, Balance, and AccountType).
  7. Ask the user for an account number to deposit into using the SearchAccount method. If found, ask the user for the amount to deposit, then deposit the amount using the Deposit method and display the new balance.
  8. Ask the user for an account number to withdraw from using the SearchAccount method. If found, ask the user for the amount to withdraw, then withdraw the amount using the Withdraw method. If successful, display the new balance. If there is insufficient balance, display an error message.
  9. Ask the user for an account number to remove using the RemoveAccount method. If successful, display a message indicating the account was removed. If not successful, display an error message.
  10. Repeat steps 6-9 as necessary.
  11. Exit the program.

 

steps

Step by step

Solved in 4 steps with 10 images

Blurred answer
Knowledge Booster
Reference Types in Function
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
  • SEE MORE 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