Challenge

Project 2

Affecting factors ;

  • statment
  • checkbalance
  • intrest rate
  • withdrawal
  • deposite

Participants;

user

(all are mentioned in one class)

  package project 2;
import java.util.*
  public class SBI{
    public static void main (String[] args) {
      Scanner sc =new Scanner(System.in);
      System.out.print("wellcome to SBI\npress 1 to create an account\npress 2 to exists user");
      in chooise=sc.nextint();
      AccountCreation ac=new AccountCreation();
      BankingOperations bop= new BankingOperations();
      if (chooise==1) {
        System.out.print(ac);
      }
      else{
        System.out.print(bop);
      }
    }
    class AccountCreation{
      String Name;
      String DOB;
      String add;
      String gender;
        Scanner sc=new Scanner(System.in);
      void acctype(){
        int a;
        System.out.print("choose your acctype press 1 for savings press2 for current ");
          int a = sc.nextint();
          if (a==1) {
            System.out.print("wellcome to a savings account ");
            System.out.print("your intrest rate will be 8% per anum");
            if(a==2){
              System.out.print("wellcome to your current account");
              System.out.print("your intrest rate will be 5% per anum");
            }
          }
          
            else {
              System.out.print("enter a valid number");
              
            } 
                    Scanner sc=new Scanner(System.in);

            void newacc(){
              System.out.print("enter your Name");
              this.Name=sc.nextline();
               System.out.print("enter your add");
              this.Name=sc.nextline();
               System.out.print("enter your DOB");
              this.Name=sc.nextline();
               System.out.print("enter your gender");
              this.Name=sc.nextline();
            
            
            System.out.print("account creation is successful");
            BankingOperations bop=new BankingOperations():
            bop.Bankops();
            
              
              
            }
          }
          class BankingOperations{
            void Bankops(){
              System.out.print("press1 to withdrawl\n press 2 to CheckBalance\npress3 to CheckIntrest\n press 4 to miniStatment\npress5 to deposite");
                                  Scanner sc=new Scanner(System.in);
int ch=sc,nextint();
switch(ch){
  case 1:
    withdraw();
    break;
     case 2:
    CheckBalance();
    break;
     case 3:
    CheckIntrest();
    break;
     case 4:
    miniStatment();
    break;
     case 5:
       deposite();
       break:
     default:
       System.out.print("invalid number");
       
    
}

              }
            }
          }
          class depositer{
            static void deposite(){
              System.out.print("enter the amount need to deposite");
                                  Scanner sc=new Scanner(System.in);

              int amount= sc.nextint();
              Balance=this.Balance+amount;
              System.out.print("amount deposited successful");
              
            }
          }
          class Checkbalance{
            void Checkbalance(){
              System.out.print("curent balance is"+Balance);
            
            }
          }
          class statement{
          void miniStatment(){
            System.out.print("your statement");
            AccountCreation ac =new AccountCreation();
            Checkbalance ck=new Checkbalance();
            
            System.out.println(ac.Name
            ac.add,
            ac.acctype,
            ac.DOB,
            ac.gender,
            ck.Balance);
          }
          
          
           
        
      }
      class withdrawl{
        static void withdraw();
        {
                      Scanner sc=new Scanner(System.in);
                      int with=sc.nextint();
                      money=this.Balance-with;
                      System.out.print("withdrawl successfully");
                      

        }
      }
      
      
    }
  }}
  }

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.