Bank

Bank

package com.tcs.ilp;

public class BankDetails
{
    String emp_id;
    String emp_role;
    double emp_salary;
    //String cust_name;
    //double loan_amount;
    //int branch_code;
    BankDetails(String id,String role,double salary)
    {
        emp_id=id;
        emp_role=role;
        emp_salary=salary;
    }
    void setSalary(double sala)
    {
        emp_salary=sala;
    }

}

package com.tcs.ilp;
import java.util.*;
public class BankFunctions 
{
    Scanner sc=new Scanner(System.in);
    void performFunctions()
    {
        ArrayList<BankDetails> arl=new ArrayList<BankDetails>();
        ArrayList<BankDetails> arl1=new ArrayList<BankDetails>();
        BankDetails bank1=new BankDetails("1001","agm",50000);
        BankDetails bank2=new BankDetails("1002","agm",40000);
        BankDetails bank3=new BankDetails("1003","dgm",30000);
        BankDetails bank4=new BankDetails("1004","gm",20000);
        BankDetails bank5=new BankDetails("1005","clerk",10000);
        BankDetails bank6=new BankDetails("1006","clerk",10000);
        arl.add(bank1);
        arl.add(bank2);
        arl.add(bank3);
        arl.add(bank4);
        arl.add(bank5);
        arl.add(bank6);
        int i1=1;
        while(i1!=-1)
        {
        System.out.println("YOUR COHOICES");
        System.out.println("1: VIEW EMPLOYEES SALARIES");
        System.out.println("2: GET LOAN");
        System.out.println("ENTER CHOICES");
        int ch=sc.nextInt();
        switch(ch)
            {
        case 1:
            System.out.println("OLD RECORDS ARE :");
            for(int k=0;k<arl.size();k++)
                {
                System.out.println(arl.get(k).emp_id);
                System.out.println(arl.get(k).emp_role);
                System.out.println(arl.get(k).emp_salary);
                }
            for(int i=0;i<arl.size();i++)
                {
                     if(arl.get(i).emp_role.equals("agm"))
                     {
                         double sal=arl.get(i).emp_salary;
                         sal=sal+.20*sal;
                         arl.get(i).setSalary(sal);
                     }
                     else if(arl.get(i).emp_role.equals("dgm"))
                     {
                         double sal=arl.get(i).emp_salary;
                         sal=sal+.15*sal;
                         arl.get(i).setSalary(sal);
                     }
                     else if(arl.get(i).emp_role.equals("gm"))
                     {
                         double sal=arl.get(i).emp_salary;
                         sal=sal+.10*sal;
                         arl.get(i).setSalary(sal);
                     }
                     else if(arl.get(i).emp_role.equals("clerk"))
                     {
                         double sal=arl.get(i).emp_salary;
                         sal=sal+.25*sal;
                         arl.get(i).setSalary(sal);
                     }
                }
            System.out.println("UPDATED RECORDS ARE :");
            for(int j=0;j<arl.size();j++)
                {
                    System.out.println(arl.get(j).emp_id);
                    System.out.println(arl.get(j).emp_role);
                    System.out.println(arl.get(j).emp_salary);
                }
            break;
        case 2:
            System.out.println("Enter the name");
            String cname=sc.next();
            System.out.println("Enter the loan amount");
            double camount=sc.nextDouble();
            System.out.println("enter the branch(1:jnk   2: bangalore 3: others");
            int bcode=sc.nextInt();
            if (bcode==1)
                {
                    if(camount>=100000 && camount<=500000)
                    {
                        System.out.println("Earlier Interest rates ="+11);
                        System.out.println("New rates are="+11.5);
                        System.out.println("Therefore yearly interest of" +.11*camount+ " goes to" +.115*camount);
                    }
                    else if(camount>=500000 && camount<=700000)
                    {
                        System.out.println("Earlier Interest Rate="+13);
                        System.out.println("New interest rates="+13.2);
                        System.out.println("net payment earlier of "+ .13*camount +"goes to "+ .132*camount);

                    }
                    else
                    {
                        System.out.println("Earlier Interest Rate="+15);
                        System.out.println("New interest rates="+16);
                        System.out.println("net payment earlier of "+ .15*camount +"goes to "+ .16*camount);
                    }

                }
            else if(bcode==2)
                {
                if(camount>=100000 && camount<=500000)
                {
                    System.out.println("Earlier Interest rates ="+11);
                    System.out.println("New rates are="+13);
                    System.out.println("Therefore yearly interest of" +.11*camount+ " goes to" +.13*camount);
                }
                else if(camount>=500000 && camount<=700000)
                {
                    System.out.println("Earlier Interest Rate="+13);
                    System.out.println("New interest rates="+15);
                    System.out.println("net payment earlier of "+ .13*camount +"goes to "+ .15*camount);

                }
                else
                {
                    System.out.println("Earlier Interest Rate="+15);
                    System.out.println("New interest rates="+18);
                    System.out.println("net payment earlier of "+ .15*camount +"goes to "+ .18*camount);
                }
                }
            else if(bcode==3)
            {
                if(camount>=100000 && camount<=500000)
                {
                    System.out.println("Earlier Interest rates ="+11);
                    System.out.println("New rates are="+12);
                    System.out.println("Therefore yearly interest of" +.11*camount+ " goes to" +.12*camount);
                }
                else if(camount>=500000 && camount<=700000)
                {
                    System.out.println("Earlier Interest Rate="+13);
                    System.out.println("New interest rates="+13.5);
                    System.out.println("Therefore earlier interest of "+ .13*camount +"goes to "+ .135*camount);

                }
                else
                {
                    System.out.println("Earlier Interest Rate="+15);
                    System.out.println("New interest rates="+16.5);
                    System.out.println("Therefore  earlier interest of "+ .15*camount +"goes to "+ .165*camount);
                }
            }

            }
        System.out.println("enter 1 to continue 0 to exit");
        int ter=sc.nextInt();
        if (ter==1)
        {
        i1++;   
        }
        else {i1=-1;}
        }
    }
}


package com.tcs.ilp;

public class BankMain 
{
    public static void main(String args[])
    {
        BankFunctions bafu=new BankFunctions();
        bafu.performFunctions();
    }
}
View Answers









Related Tutorials/Questions & Answers:
bank application
bank application  hello sir I got the simple bank application project which is very useful but I want the database for this project kindly send me database for this simple online bank application
Bank
Advertisements
Bank
Bank
Bank
Bank
Bank
Bank project
Bank project   Create a class Customer a. Having Instance variables Customer id(int), Customer Name(String), Customer Address(String), Customer Telephone(String) and Customer Email id(String) b. Method which generates Customer Id
validate bank account number
validate bank account number  how to validate bank account number in jsp
validate bank account number
validate bank account number  how to validate bank account number in jsp
Bank Management System
Bank Management System  I need a Bank Management System Project in Java Swing
ModuleNotFoundError: No module named 'bank'
ModuleNotFoundError: No module named 'bank'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bank' How to remove the ModuleNotFoundError: No module named 'bank' error
ModuleNotFoundError: No module named 'bank'
ModuleNotFoundError: No module named 'bank'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'bank' How to remove the ModuleNotFoundError: No module named 'bank' error
security mangement for bank's IT infrastructure
security mangement for bank's IT infrastructure  how i can give account number to a customer in our bank database??? plz help me out
abt the bank application
abt the bank application  pls can u send to me the user table and transaction table sql statement with their datatype used in this bank application to my email
how to generate bank account number?
how to generate bank account number?  how to generate account number?or format or rules for bank account number
ModuleNotFoundError: No module named 'bank_transactions'
ModuleNotFoundError: No module named 'bank_transactions'  Hi, My... named 'bank_transactions' How to remove the ModuleNotFoundError: No module named 'bank_transactions' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'odoo10-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-ch-bank'  Hi...: No module named 'odoo10-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'  Hi...: No module named 'odoo10-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo13-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo13-addon-l10n-nl-bank'  Hi...: No module named 'odoo13-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo13-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'bank_card'
ModuleNotFoundError: No module named 'bank_card'  Hi, My Python... 'bank_card' How to remove the ModuleNotFoundError: No module named 'bank... have to install padas library. You can install bank_card python with following
ModuleNotFoundError: No module named 'bank_transactions'
ModuleNotFoundError: No module named 'bank_transactions'  Hi, My... named 'bank_transactions' How to remove the ModuleNotFoundError: No module named 'bank_transactions' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'django-bank'
ModuleNotFoundError: No module named 'django-bank'  Hi, My Python... 'django-bank' How to remove the ModuleNotFoundError: No module named 'django-bank' error? Thanks   Hi, In your python environment
ModuleNotFoundError: No module named 'odoo10-addon-l10n-hr-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-hr-bank'  Hi...: No module named 'odoo10-addon-l10n-hr-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-hr-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'  Hi...: No module named 'odoo10-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'  Hi...: No module named 'odoo10-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank'  Hi...: No module named 'odoo10-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank'  Hi...: No module named 'odoo11-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank'  Hi...: No module named 'odoo11-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo11-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo11-addon-l10n-nl-bank'  Hi...: No module named 'odoo11-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank'  Hi...: No module named 'odoo12-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank'  Hi...: No module named 'odoo12-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo12-addon-l10n-nl-bank'
ModuleNotFoundError: No module named 'odoo12-addon-l10n-nl-bank'  Hi...: No module named 'odoo12-addon-l10n-nl-bank' How to remove the ModuleNotFoundError: No module named 'odoo12-addon-l10n-nl-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo8-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo8-addon-l10n-ch-bank'  Hi...: No module named 'odoo8-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo8-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'odoo9-addon-l10n-ch-bank'
ModuleNotFoundError: No module named 'odoo9-addon-l10n-ch-bank'  Hi...: No module named 'odoo9-addon-l10n-ch-bank' How to remove the ModuleNotFoundError: No module named 'odoo9-addon-l10n-ch-bank' error? Thanks  
ModuleNotFoundError: No module named 'trytond-bank'
ModuleNotFoundError: No module named 'trytond-bank'  Hi, My Python... 'trytond-bank' How to remove the ModuleNotFoundError: No module named 'trytond-bank' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'bank-of-england'
ModuleNotFoundError: No module named 'bank-of-england'  Hi, My... named 'bank-of-england' How to remove the ModuleNotFoundError: No module named 'bank-of-england' error? Thanks   Hi, In your python
ModuleNotFoundError: No module named 'Bank-of-Tz'
ModuleNotFoundError: No module named 'Bank-of-Tz'  Hi, My Python... 'Bank-of-Tz' How to remove the ModuleNotFoundError: No module named 'Bank... have to install padas library. You can install Bank-of-Tz python
ModuleNotFoundError: No module named 'django-bank'
ModuleNotFoundError: No module named 'django-bank'  Hi, My Python... 'django-bank' How to remove the ModuleNotFoundError: No module named 'django-bank' error? Thanks   Hi, In your python environment
bank details - JSP-Servlet
bank details  hi i just need a coding for bank details... since iam working as a trainee my leader gave me task like this.. What he want me to do is first to set the user account details in database, and the to create a login
bank management - Java Beginners
bank management  Assume that the bank maintains two kinds of accounts for its customers, one called savings account and the other current account. The savings account provides compound interest and withdrawal facilities
Bank account gui
Bank account gui  Add event handling to the AccountUI class which will allow you to: 1. Create new account, when the ââ?¬Ë?Createââ?¬â?¢ button... static void main(String arg[]){ Account at=new Account (); at.setTitle("Bank Account
bank account gui
bank account gui  Add event handling to the AccountUI class which will allow you to: 1.Create new account, when the â??Createâ?? button is pressed...[]){ Account at=new Account (); at.setTitle("Bank Account System"); at.setSize(500,300
simple bank application - JSP-Servlet
simple bank application  hi i got ur codings...But if we register a new user it is not updating in the database...so plz snd me the database also.... Thank you
bank of america data scientist jobs
bank of america data scientist jobs  Hi, I am beginner in Data...: bank of america data scientist jobs Try to provide me good examples or tutorials links so that I can learn the topic "bank of america data scientist
ModuleNotFoundError: No module named 'client-bank-exchange-1c-py2'
ModuleNotFoundError: No module named 'client-bank-exchange-1c-py2'  ...: No module named 'client-bank-exchange-1c-py2' How to remove the ModuleNotFoundError: No module named 'client-bank-exchange-1c-py2' error? Thanks
ModuleNotFoundError: No module named 'django-bank-utils'
ModuleNotFoundError: No module named 'django-bank-utils'  Hi, My... named 'django-bank-utils' How to remove the ModuleNotFoundError: No module named 'django-bank-utils' error? Thanks   Hi, In your
ModuleNotFoundError: No module named 'odoo10-addon-partner-bank-active'
ModuleNotFoundError: No module named 'odoo10-addon-partner-bank-active' ...: ModuleNotFoundError: No module named 'odoo10-addon-partner-bank-active' How to remove the ModuleNotFoundError: No module named 'odoo10-addon-partner-bank-active'
ModuleNotFoundError: No module named 'odoo10-addons-oca-bank-payment'
ModuleNotFoundError: No module named 'odoo10-addons-oca-bank-payment' ...: No module named 'odoo10-addons-oca-bank-payment' How to remove the ModuleNotFoundError: No module named 'odoo10-addons-oca-bank-payment' error
ModuleNotFoundError: No module named 'odoo11-addon-donation-bank-statement'
ModuleNotFoundError: No module named 'odoo11-addon-donation-bank-statement...: ModuleNotFoundError: No module named 'odoo11-addon-donation-bank-statement' How to remove the ModuleNotFoundError: No module named 'odoo11-addon-donation-bank

Ads