Java Exp-5
Java Exp-5
import java.lang.*;
interface Bank
int no_of_years=3;
void show();
} class
Customer {
String cust_name;
int cust_id;
Customer(String s,int i)
cust_name = s;
cust_id = i;
void display()
System.out.println("Customer Id = "+cust_id);
}
}
class Account extends Customer implements
Bank
{
int acc_no;
float acc_bal;
Account(String s,int
i,int n,float b)
super(s,i);
acc_no=n;
acc_bal=b;
super.display();
void interest()
show();
System.out.println("Interest = "+intr);
}
} class Main3
args)
{
Account ac = new
Account("Sameer",8008,123456,50000f);
ac.interest();
}
}