Placement 2025 Scholarship: Your Future Starts Here | 6 Guaranteed Job Interviews | Limited to 100 seats. Apply Now

01D 18H 29M 51S

Menu

Executive Programs

Workshops

Projects

Blogs

Careers

Placements

Student Reviews


For Business


More

Academic Training

Informative Articles

Find Jobs

We are Hiring!


All Courses

Choose a category

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

All Courses

All Courses

logo

CHOOSE A CATEGORY

Mechanical

Electrical

Civil

Computer Science

Electronics

Offline Program

Top Job Leading Courses

Automotive

CFD

FEA

Design

MBD

Med Tech

Courses by Software

Design

Solver

Automation

Vehicle Dynamics

CFD Solver

Preprocessor

Courses by Semester

First Year

Second Year

Third Year

Fourth Year

Courses by Domain

Automotive

CFD

Design

FEA

Tool-focused Courses

Design

Solver

Automation

Preprocessor

CFD Solver

Vehicle Dynamics

Machine learning

Machine Learning and AI

POPULAR COURSES

coursePost Graduate Program in Hybrid Electric Vehicle Design and Analysis
coursePost Graduate Program in Computational Fluid Dynamics
coursePost Graduate Program in CAD
coursePost Graduate Program in CAE
coursePost Graduate Program in Manufacturing Design
coursePost Graduate Program in Computational Design and Pre-processing
coursePost Graduate Program in Complete Passenger Car Design & Product Development
Executive Programs
Workshops
For Business

Success Stories

Placements

Student Reviews

More

Projects

Blogs

Academic Training

Find Jobs

Informative Articles

We're Hiring!

phone+91 9342691281Log in
  1. Home/
  2. Paul Selvi/
  3. Project 2

Project 2

CHALLENGE-10 All the banks operating in India are controlled by the RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set the minimum interest rate applicable to a savings…

    • Paul Selvi

      updated on 29 Jan 2023

    CHALLENGE-10

    All the banks operating in India are controlled by the RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set the minimum interest rate applicable to a savings bank account to be 4% annually; however, banks are free to use 4% interest raate or to set any rates above it.

    Write a JAVA program to implement bank functionality in the above scenario and demonstrate the OOPs concepts and explain how it is actually satisfying that concept.

    Note:

    • Create a console application for the banking management system.
    • Create few classes namely Customer, Account, RBI (Base Class) and few derived classes (SBI, ICICI, PNB etc). Assume and implement required member variables and functions in each class.
    • In every Bank there should be at least 2 types of account saving and current.
    • Saving should give simple interest and Current should provide compound interest on deposited amount.
    • In the current account the interest is compounded twice a year (on half yearly its compounded).
    • For Every type of account at least 2 users will be there.
    • On the running of the application it should ask which bank we want to access.
    • Then what type of account you have.
    • And then for which user account we want to access.
    • Minimum amount for saving account is 2000/- and for current account is 5000/-
    • And we can calculate the interest for any given time and total amount as well.
    • Interest rates for saving will be 5% annually and for current it will be 8% annually.
    • Before calculating interest it should ask the user for how many years you want to calculate it.
    • Write code to calculate both types of interests as well for any of the users.

    For total amount on Simple Interest:

    A = P(1 + rt)

    Where:

    A = final Amount

    P = initial Principal balance

    r = annual interest rate

    t = time (in years)

    So, Total Interest = (A - P)

    For total amount on Compound Interest:

    𝐴 = (1 + 𝑟𝑛)𝑡

    A = final Amount

    P = initial Principal balance

    r = annual interest rate

    t = time (in years)

    n = number of times interest is compounded per year

    Sample Input

    Sample Output

    Want to open an account?

    yes/No

    If yes, Insert name, type of

    account and date of birth, in

    which bank you want

    Account has been opened and account

    no is: 123

    Want to print mini statement

    If yes, save it in .txt file somewhere

    Calculate interest

    If yes, calculate and print

    Hint:

    Class Customer

    {

    //Personal Details ...

    // Few functions ...

    }

    Class Account

    {

    // Account Detail ...

    // Few functions ...

    }

    Class RBI

    {

    Customer c; //hasA relationship

    Account a; //hasA relationship

    ..

    Public double GetInterestRate() { }

    Public double GetWithdrawalLimit() { }

    }

    Class SBI: public RBI

    {

    //Use RBI functionality or define own functionality.

    }

    Class ICICI: public RBI

    {

    //Use RBI functionality or define own functionality.

    }

    PROGRAM:

    import java.util.Scanner;

    import java.io.File;

    import java.io.FileNotFoundException;

    import java.io.PrintWriter;

    import java.util.Random;

    class Customer

    {

    private int accno;

    private String name;

    private String acc_type;

    private long balance;

    private String dob;

    Scanner sc = new Scanner(System.in);

    //method to open new account

    public void openAccount()

    {

    System.out.print("\nEnter your name: ");

    name = sc.next();

    System.out.print("Enter your Account type: ");

    acc_type = sc.next();

    System.out.print("Enter your date of birth: ");

    dob = sc.next();

    //create account number

    Random rand = new Random();

    accno = rand.nextInt(10000);

    System.out.print("Account has been opened successfully!!"+"\n Your account number is:"+accno);

    Account A= new Account();

    A.showAccount();

    int choi;

    System.out.println("1. Saving Account \n 2. Current Account\n 3.Exit ");

    System.out.println("Enter your choice: ");

    choi = sc.nextInt();

    switch (choi) {

    case 1:

    System.out.print("\n Account type is:"+acc_type+"\n");

    RBI SI= new RBI();

    SI.simpleinterest();

    case 2:

    System.out.print("\n Account type is:"+acc_type+"\n");

    RBI CI= new RBI();

    CI.compoundinterest();

    case 3:

    break;

    }

    }

    class Account{

    //method to display account details

    public void showAccount() {

    System.out.println("\nAccount Details");

    System.out.println("\nName of account holder: " + name);

    System.out.println("Account no.: " + accno);

    System.out.println("Account type: " + acc_type);

    System.out.println("Date of Birth: " + dob);

    System.out.println("Balance: " + balance);

    }

    }

    class RBI{ // Base class

    int withLimit;

    public void simpleinterest() {

    double P, r, t, s_interest,A,totint,minbal;

    Scanner scanner = new Scanner(System.in);

    System.out.println("Enter the value of Principal:");

    P = scanner.nextDouble();

    r=5;

    System. out. print("Enter the Time (years):");

    t = scanner.nextDouble();

    s_interest = (P * r * t)/100;

    System.out.println("Simple Interest: "+s_interest);

    A = P * (1+(r * t));

    System.out.println("Total Amount on Simple Interest: "+A);

    totint=A-P;

    System.out.println("Total Interest: "+totint);

    minbal=2000;

    System.out.println("Minimum Balance: "+minbal);

    SBI sbi = new SBI();

    int sbiWL= sbi.setWithdrawalLimit();

    System.out.println("SBI withdraw limit is:"+sbiWL);

    ICICI icici = new ICICI();

    int iciciWL= icici.setWithdrawalLimit();

    System.out.println("ICICI withdraw limit is:"+iciciWL);

    PNB pnb = new PNB();

    int pnbWL= pnb.setWithdrawalLimit();

    System.out.println("PNB withdraw limit is:"+pnbWL);

    File file = new File("E:\\Skilllync\\Introduction to JAVA\\Challenge-10\\CHALLENGE-10\\simpleinterest.txt");

    PrintWriter printWriter = null;

    try

    {

    printWriter = new PrintWriter(file);

    printWriter.println("Simple Interest: "+s_interest);

    }

    catch (FileNotFoundException e)

    {

    e.printStackTrace();

    }

    finally

    {

    if ( printWriter != null )

    {

    printWriter.close();

    }

    }

    }

    public void compoundinterest() {

    double A,P, r,nc,t,c_interest,totintst,minibal;

    Scanner scanner = new Scanner(System.in);

    System.out.print("Enter the value of Principal:");

    P = scanner.nextDouble();

    //System. out. print("Enter the Annual Rate of Interest:");

    //r = scanner.nextDouble();

    r=8;

    nc=2;

    System. out. print("Enter the Time (years):");

    t = scanner.nextDouble();

    c_interest = P * Math.pow(1.0+r/100.0,t) - P;

    System.out. println("Compound Interest: "+c_interest);

    A = P * (1+(r * nc))*(nc*t);

    System.out.println("Total Amount on Compound Interest: "+A);

    minibal=5000;

    System.out.println("Minimum Balance: "+minibal);

    File file = new File("E:\\Skilllync\\Introduction to JAVA\\Challenge-10\\ CHALLENGE-10\\compoundinterest.txt");

    PrintWriter printWriter = null;

    try

    {

    printWriter = new PrintWriter(file);

    printWriter.println("Compound Interest: "+c_interest);

    }

    catch (FileNotFoundException e)

    {

    e.printStackTrace();

    }

    finally

    {

    if ( printWriter != null )

    {

    printWriter.close();

    }

    }

    }

    }

    class SBI extends RBI{ // derived class1

    int setWithdrawalLimit() {

    withLimit=10000;

    return withLimit;

    }

    }

    class ICICI extends RBI{ // derived class2

    int setWithdrawalLimit() {

    withLimit=15000;

    return withLimit;

    }

    }

    class PNB extends RBI{ // derived class1

    int setWithdrawalLimit() {

    withLimit=20000;

    return withLimit;

    }

    }

    }

    public class BankingApp {

    public static void main(String args[]) {

    Scanner sc = new Scanner(System.in);

    int choice;

    do {

    Scanner sc1 = new Scanner(System.in);

    System.out.print("Do you want to open an account?(Y/N)");

    choice = sc1.next().charAt(0);

    //Select Bank

    System.out.print("In which bank, do you want to open an account:");

    int ch1;

    System.out.println("1. SBI Bank \n 2. ICICI Bank\n 3. PNB Bank \n 4.Exit ");

    System.out.println("Enter your choice: ");

    ch1 = sc.nextInt();

    switch (ch1) {

    case 1:

    System.out.print("SBI Bank\n");

    System.out.print("How many number of customers do you want to input? ");

    //create customer

    Scanner sc2 = new Scanner(System.in);

    int n = sc2.nextInt();

    Customer C[] = new Customer[n];

    for (int i = 0; i < C.length; i++) {

    C[i] = new Customer();

    C[i].openAccount();

    }

    break;

    case 2:

    System.out.print("ICICI Bank\n");

    System.out.print("How many number of customers do you want to input? ");

    //create customer

    Scanner sc3 = new Scanner(System.in);

    int n1 = sc3.nextInt();

    Customer C1[] = new Customer[n1];

    for (int i = 0; i < C1.length; i++) {

    C1[i] = new Customer();

    C1[i].openAccount();

    }

    break;

    case 3:

    System.out.print("PNB Bank\n");

    System.out.print("How many number of customers do you want to input? ");

    //create customer

    Scanner sc4 = new Scanner(System.in);

    int n2 = sc4.nextInt();

    Customer C2[] = new Customer[n2];

    for (int i = 0; i < C2.length; i++) {

    C2[i] = new Customer();

    C2[i].openAccount();

    }

    break;

    case 4:

    break;

    }

    }

    while(choice == 'Y'|| choice == 'y');

    }

    }

    OUTPUT:

    Do you want to open an account?(Y/N)Y

    In which bank, do you want to open an account:1. SBI Bank

    1. ICICI Bank
    2. PNB Bank

    4.Exit

    Enter your choice:

    1

    SBI Bank

    How many number of customers do you want to input? 1

    Enter your name: PAUL

    Enter your Account type: SAVING

    Enter your date of birth: 12.02.2003

    Account has been opened successfully!!

    Your account number is:1344

    Account Details

    Name of account holder: PAUL

    Account no.: 1344

    Account type: SAVING

    Date of Birth: 12.02.2003

    Balance: 0

    1. Saving Account
    2. Current Account

    3.Exit

    Enter your choice:

    1

    Account type is:SAVING

    Enter the value of Principal:

    2000

    Enter the Time (years):3

    Simple Interest: 300.0

    Total Amount on Simple Interest: 32000.0

    Total Interest: 30000.0

    Minimum Balance: 2000.0

    SBI withdraw limit is:10000

    ICICI withdraw limit is:15000

    PNB withdraw limit is:20000

     

     

     

    Leave a comment

    Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.

    Please  login to add a comment

    Other comments...

    No comments yet!
    Be the first to add a comment

    Read more Projects by Paul Selvi (4)

    Project 2 - Shopping cart application

    Objective:

    Shopping Cart Application

    calendar

    05 Mar 2023 09:51 AM IST

      Read more

      Project 1 - Expense tracker

      Objective:

      Expense tracker application

      calendar

      01 Mar 2023 04:44 PM IST

        Read more

        Project 2

        Objective:

        CHALLENGE-10 All the banks operating in India are controlled by the RBI. RBI has set a well defined guideline (e.g. minimum interest rate, minimum balance allowed, maximum withdrawal limit etc) which all banks must follow. For example, suppose RBI has set the minimum interest rate applicable to a savings…

        calendar

        29 Jan 2023 12:06 PM IST

          Read more

          Project 1

          Objective:

          ecommerce project file attached below.Please find my attachment.

          calendar

          18 Jan 2023 05:53 PM IST

            Read more

            Schedule a counselling session

            Please enter your name
            Please enter a valid email
            Please enter a valid number

            Related Courses

            coursecard

            Design loads considered on bridges

            Recently launched

            10 Hours of Content

            coursecard

            Design of Steel Superstructure in Bridges

            Recently launched

            16 Hours of Content

            coursecard

            Design for Manufacturability (DFM)

            Recently launched

            11 Hours of Content

            coursecard

            CATIA for Medical Product Design

            Recently launched

            5 Hours of Content

            coursecardcoursetype

            Accelerated Career Program in Embedded Systems (On-Campus) Courseware Partner: IT-ITes SSC nasscom

            Recently launched

            0 Hours of Content

            Schedule a counselling session

            Please enter your name
            Please enter a valid email
            Please enter a valid number

            logo

            Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.

            https://d27yxarlh48w6q.cloudfront.net/web/v1/images/facebook.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/insta.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/twitter.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/youtube.svghttps://d27yxarlh48w6q.cloudfront.net/web/v1/images/linkedin.svg

            Our Company

            News & EventsBlogCareersGrievance RedressalSkill-Lync ReviewsTermsPrivacy PolicyBecome an Affiliate
            map
            EpowerX Learning Technologies Pvt Ltd.
            4th Floor, BLOCK-B, Velachery - Tambaram Main Rd, Ram Nagar South, Madipakkam, Chennai, Tamil Nadu 600042.
            mail
            info@skill-lync.com
            mail
            ITgrievance@skill-lync.com

            Top Individual Courses

            Computational Combustion Using Python and CanteraIntroduction to Physical Modeling using SimscapeIntroduction to Structural Analysis using ANSYS WorkbenchIntroduction to Structural Analysis using ANSYS Workbench

            Top PG Programs

            Post Graduate Program in Hybrid Electric Vehicle Design and AnalysisPost Graduate Program in Computational Fluid DynamicsPost Graduate Program in CADPost Graduate Program in Electric Vehicle Design & Development

            Skill-Lync Plus

            Executive Program in Electric Vehicle Embedded SoftwareExecutive Program in Electric Vehicle DesignExecutive Program in Cybersecurity

            Trending Blogs

            Heat Transfer Principles in Energy-Efficient Refrigerators and Air Conditioners Advanced Modeling and Result Visualization in Simscape Exploring Simulink and Library Browser in Simscape Advanced Simulink Tools and Libraries in SimscapeExploring Simulink Basics in Simscape

            © 2025 Skill-Lync Inc. All Rights Reserved.

                        Do You Want To Showcase Your Technical Skills?
                        Sign-Up for our projects.