Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write this code. Bank Teller\'s Assistant REQUIREMENT: A local Bank would like y

ID: 658243 • Letter: W

Question

Write this code. Bank Teller's Assistant REQUIREMENT: A local Bank would like you to write a Program that handles their waiting list for Customers arrivals. SCENARIO: Customers arrive at the bank, they register (Name, YearOB, type of service requested) to be called and they'll get a ticket with their info(Name, Age, service,etc). Customers wait for service by the teller if the teller is busy, then are served, and then depart the system. Customers arriving to the system when the teller is busy wait in a lobby area expecting to be called by the teller when available. Customers older than 55 automatically get in the line right after the next person waiting to be served. The program should be able to print record at any time of the Present Waiting List as well of the list of attendees during the day and a message when the waiting list is empty. KEY: To accomplish this task you'll need to use dictionaries, lists, strings, functions, IF and WHILE conditions (menu options),etc. Write this code. Bank Teller's Assistant REQUIREMENT: A local Bank would like you to write a Program that handles their waiting list for Customers arrivals. SCENARIO: Customers arrive at the bank, they register (Name, YearOB, type of service requested) to be called and they'll get a ticket with their info(Name, Age, service,etc). Customers wait for service by the teller if the teller is busy, then are served, and then depart the system. Customers arriving to the system when the teller is busy wait in a lobby area expecting to be called by the teller when available. Customers older than 55 automatically get in the line right after the next person waiting to be served. The program should be able to print record at any time of the Present Waiting List as well of the list of attendees during the day and a message when the waiting list is empty. KEY: To accomplish this task you'll need to use dictionaries, lists, strings, functions, IF and WHILE conditions (menu options),etc. Bank Teller's Assistant REQUIREMENT: A local Bank would like you to write a Program that handles their waiting list for Customers arrivals. SCENARIO: Customers arrive at the bank, they register (Name, YearOB, type of service requested) to be called and they'll get a ticket with their info(Name, Age, service,etc). Customers wait for service by the teller if the teller is busy, then are served, and then depart the system. Customers arriving to the system when the teller is busy wait in a lobby area expecting to be called by the teller when available. Customers older than 55 automatically get in the line right after the next person waiting to be served. The program should be able to print record at any time of the Present Waiting List as well of the list of attendees during the day and a message when the waiting list is empty. KEY: To accomplish this task you'll need to use dictionaries, lists, strings, functions, IF and WHILE conditions (menu options),etc.

Explanation / Answer

public class BankCustomer

{

    private string cust_Name;

    private string cust_Activity;

    private int cust_Number;

    private int cust_Amt;

private int cust_age;

    public BankCustomer() { }

    public BankCustomer(string name, string bankingActivity, int accountNumber, int amount, int age)

    {

        cust_Name    = name;

        cust_Activity = bankingActivity ;

        cust_Number =accountNumber ;

        cust_Amt = amount;

    cust_age = age;

    }

    public string name

    { get { return cust_Name; }

        set { cust_Name = value; }

    }

    public string bankingActivity

    { get { return cust_Activity; }

        set { cust_Activity = value; }

    }

    public int accountNumber

  {   get { return cust_Number; }

        set { cust_Number = value; }

    }

    public int amount

    { get { return cust_Amt; }

        set { cust_Amt = value; }

    }

    public int age

    { get { return cust_age; }

        set { cust_age = value; }

    }

}

public void Queue_Content(Queue localQueue)

{

    BankCustomer tempCustomer = new BankCustomer();

    Queue copyoflocalQueue = new Queue();

    // make the copy

    copyoflocalQueue = (Queue)localQueue.Clone();

    Console.WriteLine(" ");

    Console.WriteLine("View the queue using a copy");

    do

    {

        tempCustomer = (BankCustomer)copyoflocalQueue.Dequeue();

        Console.WriteLine("Name: " + tempCustomer.name + ",                          Activity: " + tempCustomer.bankingActivity + ", Account no: " +                           tempCustomer.accountNumber.ToString() + ", Amount $" +                           tempCustomer.amount.ToString());

    }

while (copyoflocalQueue.Count != 0);

}

public void Queue_Content(Queue localQueue)

{

  BankCustomer tempCustomer = new BankCustomer();

    // get the built in enumerator

    System.Collections.IEnumerator en = localQueue.GetEnumerator();

    Console.WriteLine(" ");

    Console.WriteLine("View the queue using an enumerator");

    while (en.MoveNext())

    {

        tempCustomer = (BankCustomer)en.Current;

        Console.WriteLine("Name: " + tempCustomer.name + ", Activity: " +                           tempCustomer.bankingActivity + ", Account no: " +                       tempCustomer.accountNumber.ToString() + ", Amount $" + tempCustomer.amount.ToString());

    }

public void ProcessCust_Request(BankCustomer customer)

{

    Console.WriteLine("Customer: " + customer.name);

    Console.WriteLine("Activity: " + customer.bankingActivity);

    if ((customer.bankingActivity == "deposit") | customer.bankingActivity == transferFunds")

    {

        AmountOnDeposit += customer.amount;

        Console.WriteLine("Amount on Deposit: " + AmountOnDeposit);

    }

    if (customer.bankingActivity == "withdrawl" && (customer.name != "John Dillinger"))

    {

        AmountOnDeposit -= customer.amount;

        Console.WriteLine("Amount on Deposit: " + AmountOnDeposit);

    }

    if ((customer.bankingActivity == "withdrawl")&&(customer.name == "John Dillinger"))

    {

        AmountOnDeposit = 0;

        Console.WriteLine("Big Bank Robery !!!    Amount on Deposit: " +

                          AmountOnDeposit);

    }

    Console.WriteLine("------------------------------------------------");

}

}