0% found this document useful (0 votes)
2 views4 pages

Java Account Management System

Uploaded by

RAMU.M
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

Java Account Management System

Uploaded by

RAMU.M
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

package account;

public class Account {


private int acc;
private String name;
private int ph_no;
private int ifsc;
private double bal;
public Account(int acc, String name, int ph_no, int ifsc, double bal) {
[Link] = acc;
[Link] = name;
this.ph_no = ph_no;
[Link] = ifsc;
[Link]=bal;
}
public int getacc()
{
return acc;
}
public String getname()
{
return name;
}
public int getph_no()
{
return ph_no;
}
public int getifsc()
{
return ifsc;
}
public double getbal()
{
return bal;
}
public void setacc(int acc)
{
[Link]=acc;
}
public void setname(String name)
{
[Link]=name;
}
public void setph_no(int ph_no)
{
this.ph_no=ph_no;
}
public void setifsc(int ifsc)
{
[Link]=ifsc;
}
public void setbal(double bal )
{
[Link]=bal;
}
public double getBal() {
return bal;
}
public void setBal(double bal) {
[Link] = bal;
}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////

package account;

public class Accountcreation {


public Account createAccount(int acc,String name,int ph_no,int ifsc,double bal)
{
[Link]("creating the Account for you!!");
Account a1=new Account(acc, name, ph_no, ifsc, bal);
return a1;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////

package transactions;

import [Link];

public class WithdrawTransaction {


public boolean withdraw(Account a1,double value)
{
if([Link]()>value)
{
[Link]([Link]()-value);
[Link]([Link]());
}
else
{
[Link]("insuffienct balance"+[Link]());
return false;
}
return true;

}
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////

package transactions;

import [Link];
public class DepositTransaction {
public void deposit(Account a1,double value)
{
[Link]([Link]()+value);
[Link]([Link]());
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////

package transactions;

import [Link];

public class FundTransfer {


public boolean Transfer(Account a1,Account a2,double value)
{
if([Link]()>value) {
[Link]([Link]()-value);
[Link]("the amount transfer"+[Link]());
[Link]([Link]()+value);
[Link]("the amount transfer"+[Link]());
}
else
{
[Link]("insufficent balance");
return false;
}
return true;
}

}
/////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
package transactions;

import [Link];

public class ViewAccountBalance {


public void ViewBalance(Account a1)
{
[Link]([Link]());
}

/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////

package app;

import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];

public class MainClass {

public static void main(String[] args) {


Accountcreation ac1= new Accountcreation();
Accountcreation ac2= new Accountcreation();
Account a1=[Link](1201, "Aakash", 1234567, 12450, 50000.0);
Account a2=[Link](1202, "Lokesh", 124578960, 12453, 10000.0);
WithdrawTransaction w1= new WithdrawTransaction();
DepositTransaction d1= new DepositTransaction();
FundTransfer f1= new FundTransfer();
ViewAccountBalance v1= new ViewAccountBalance();
[Link](a1);
[Link](a2);
[Link](a1, 10000.0);
[Link](a2, 200000.0);
[Link](a1, 10000.0);
[Link](a2, 20000.0);
[Link](a1, a2, 20000.0);

You might also like