Bank project of simple intrest in java.



interface account
{
float rate=8.5f;
void set(int accno);
void display();
}

interface person
{
void store(String name, String address);
void show();
}

class Customer implements account, person
{
int accno, numyears;
float bal;
String name="";
String address="";
Customer(float a, int b)
{
bal=a;
numyears=b;
}

public void set(int accno)
{
this.accno=accno;
}
public void display()
{
System.out.println("the account no. and balance is: "+accno+bal);
}

public void store(String name, String address)
{
this.name=name;
this.address=address;
}

public void show()
{
System.out.println("the name and the address is:"+name+" "+address);
}

void interest()
{
float si=bal*numyears*rate/100;
System.out.println("the simple interest is:"+si);
}
}


class Details
{
public static void main(String args[])
{
Customer c1=new Customer(15.0f, 2);
c1.set(100);
c1.store("Popsys","nagpur");
c1.show();
c1.display();
c1.interest();
}
}

We Are Founder..