0% found this document useful (0 votes)
44 views2 pages

Computer Project Softcopy by Vrushank

This Java program defines a Saving_Ac class to model a bank account with methods to withdraw, deposit, and display account information. The withdraw1 method prompts the user to enter their account number and name, then displays the current balance before asking how much they want to withdraw. The deposit method similarly prompts for the account number and balance before asking how much to deposit. The display method prints the account details including number, name, and updated balance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
44 views2 pages

Computer Project Softcopy by Vrushank

This Java program defines a Saving_Ac class to model a bank account with methods to withdraw, deposit, and display account information. The withdraw1 method prompts the user to enter their account number and name, then displays the current balance before asking how much they want to withdraw. The deposit method similarly prompts for the account number and balance before asking how much to deposit. The display method prints the account details including number, name, and updated balance.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

import java.io.

*;
public class Saving_Ac
{
int acno;
double money= 33245.25,depo=0,draw=0,balance=0;
String name
public void withdraw1()throws IOException
{
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(read);
System.out.println(welcome to ICICI bank);
System.out.println(Enter the account no.);
acno=Integer.parseInt(in.readline());
System.out.println(Enter the name of the a/c holder);
name=in.reaLline();
System.out.println(The present balance in your account is Rs+(money+depo-draw));
System.out.println(How much money do you want to withdraw ?);
draw=Float.parseFloat(in.readline ());
}
public void deposit()throws IOException
{
InputStreamReader read = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(read);
System.out.println(Welcome to ICICI bank);

System.out.println(Enter the account no.);


acno=Integer.parseInt(in.readline());
System.out.println(The present balance in your account is Rs.+(money+depodraw));
System.out.println(How much money do you want to deposit ?);
depo=Float.parseFloat(in.readLine());
}
public void display()
{
System.out.println(Welcome to ICICI bank);
System.out.println(The A/c no. :+acno);
System.out.println(The name of A/c holder :+name);
System.out.println(The balance in your account is Rs.+(money+depo-draw));
System.out.println(Thank you);
}
}

You might also like