Project 2
import java .util.scanner;
class Customer
{
String name ,address;
int age;
}
class Account
{
String accType,branchType;
}
class RBI
{
int withLimit,n;
double A,P,r;
float t;
long avg,tot,mb;
int setWithdrawalLimit()
{
Scanner inp =new
Scanner(System.in);
String actype=inp.nextLine();
String brtype=inp .nextLine();
if(actype=="SVANIGS"&&brtype=="METRO")
{
with Limit=5000;
}
else
{
with Limit=4000;
}
return with Limit;
}
double setintersetRate()
{
A=(p+r)/n*t;
return A;
}
long setMAB()
{
mb=(avg*tot)/31;
return mb;
}
}
class SBI extends RBI
{
double setintersetRate()
{
A=P*(1=r/n)+n*t;
return A;
}
long setMAB()
{
mb=(avg +tot)/30;
return mb;
}
}
class ICICI extends RBI
{
double setinterestRate()
{
A=(P*r)/n+t;
return A;
}
int setWithdrawalLimit()
{
with Limit=7000;
return with Limit;
}
}
public class inhTest
public static void main (String args [])
{
SBI sbi=new SBI();
ICICI icici=new ICICI();
sbi.p=10.433;
sbi.r=7.42;
sbi.n=5;
sbi.t=7;
Double sbiint=sbi.setinterestRate();
System.out.println("SBI interest rate is:"+sbiint);
int iciciWL =icici.setWithdrawalLimit();
System.out.println()"ICICI withdraw limit is:"+iciciWL);
}
}