Skip to content

Instantly share code, notes, and snippets.

@08shubhamjindal
Last active July 31, 2020 11:04
Show Gist options
  • Save 08shubhamjindal/171d3a19a328f77d68191e35c10c833a to your computer and use it in GitHub Desktop.
Save 08shubhamjindal/171d3a19a328f77d68191e35c10c833a to your computer and use it in GitHub Desktop.
a java program of bank that have deposit withdrawl loan procedure
import java.util.Scanner;
class bank
{
public static void main(String[] r)
{
Scanner s = new Scanner(System.in);
System.out.println("enter the name");
String a;
a=s.nextLine();
System.out.println("enter the phone no");
int b;
b=s.nextInt();
System.out.println("enter your father name");
String f;
c=s.nextLine();
System.out.println("enter your mother name");
String da;
da=s.nextLine();
System.out.println("enter 1 for loan 2 for deposit 3 for withdrawl 4 for information");
int c;
c=s.nextInt();
switch(c)
{
case 1:
{
loan d;
d=new loan();
d.display();
break;
}
case 2:
{
deposit e;
e=new deposit();
e.display();
break;
}
case 3:
{
withdrawl fa;
fa=new withdrawl();
fa.display();
break;
}
}
}
}
import java.util.Scanner;
class deposit
{
private int z,y;
public deposit()
{
Scanner p = new Scanner(System.in);
System.out.println("enter the previous amount in your bank");
y=p.nextInt();
System.out.println("enter the deposit amount");
z=p.nextInt();
}
public void display()
{
System.out.println("final amount is"+(z+y));
}
}
import java.util.Scanner;
class loan
{
private int z;
public loan()
{
System.out.println("enter the loan amount");
Scanner p = new Scanner(System.in);
z=p.nextInt();
}
public void display()
{
System.out.println("the loan amount is"+z);
}
}
import java.util.Scanner;
class withdrawl
{
private int z,y;
public withdrawl()
{
Scanner p = new Scanner(System.in);
System.out.println("enter the previous amount in your bank");
y=p.nextInt();
System.out.println("enter the withdrawl amount");
z=p.nextInt();
}
public void display()
{
System.out.println("final amount is"+(y-z));
}
}
@Penelopetu
Copy link

Thanks, it helped me with my project!

@Unaco
Copy link

Unaco commented Jul 28, 2020

Hey, thank you very much! Now I am conducting research on banks and especially loans and loans that they give, and this java program is a big plus for my project! Acting as a credit provider is one of the main activities of financial institutions, such as banks and credit card companies, and they do not always act on behalf of their clients.. My friend had problems and needed money, so he took out a Bank loan, but the interest rate was too high and it didn't end well for him. I can recommend this site https://credit-10.com/mx/prestamos-personales-en-linea/ since it is proven and reliable in loans!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment