
正文
银行活期存款java代码 java模拟银行定期存款功能
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
银行交易代码
不同银行银行活期存款java代码的交易代码都不同。设计银行交易代码是为银行活期存款java代码了快捷输入。
如下列代码是xx银行的交易代码银行活期存款java代码:
1313查询帐户对应灵通卡号
1314查询储蓄帐户档案
1315储蓄帐户补打凭证
1316储蓄帐户验证密码
1317储蓄批量开户补登折
1318客户存款状况中间表查询
1700查询活期一本通余额明细
1701查询活期储蓄帐户
1702查询活期储蓄历史明细
1703活期储蓄换折
1704活期储蓄补登折
1705补打活期储蓄未登折明细清单
1707活期异地无折查询余额
1709旧系统存折换新折。
相关问答
Q1: 在java中怎么算一年的利息,假如年利率是2.25%
class CalculateInterests{
// 假想一种最简单的情况:活期存且每天本金不变动
// 存款日期
private Date depositDate;
// 取款日期
private Date drawDate;
// principal 本金 annualRate 年利率
public double calucalueInterests(double principal,double annualRate){
// 假设只在取款的那一天计算利息,实际情况可能是日结,周结,季结
// 取款时候会得到存了多少天interval
int interval = drawDate.compareTo(depositDate);
for(int i=0;iinterval;i++){
principal = principal*(1+annualRate);
}
return principal;
}
// 每年的天数
public int dayCount(int year){
// logic
return 365;
}
// getter and setter
}
Q2: 在java里怎么做 存入1000本金,计算一年,二年,三年,五年,到期取款时,银行应支付的本息是多少?
package com.sh.lw;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class CalculationOfPrincipalAndInterest {
private static final int PRINCIPAL = 1000;
/**
* 主函数 (第一个参数是年,第二个参数是利率)
* @param args
*/
public static void main(String[] args) {
CalculationOfPrincipalAndInterest copai = new CalculationOfPrincipalAndInterest();
try {
if(!copai.isLegal(args))
return;
else{
}
Integer year = new Integer(args[0].trim());
Float interest = new Float(args[1].trim());
Float result = copai.countPrincipalAndInterest(year, interest);
copai.printResult(result);
} catch (Exception e) {
// TODO Auto-generated catch block
System.out.println(e.getMessage());
}
}
/**
* 判断输入是否合法
*/
public boolean isLegal(String[] arr) throws Exception
{
if(arr.length2)
throw new Exception("只需要两个参数!");
if(arr.length2)
throw new Exception("请输入参数!");
Pattern p = Pattern.compile("\\d+");
Matcher m = p.matcher(arr[0]);
Matcher m2 = p.matcher(arr[1]);
boolean b = m.matches();
boolean b1 = m2.matches();
if(bb1)
return true;
return false;
}
/**
* 计算本息
*/
public Float countPrincipalAndInterest(Integer year,Float interest)
{
/*利息和*/
Float sumInterest = CalculationOfPrincipalAndInterest.PRINCIPAL*year*interest;
/*本息*/
Float result = sumInterest + CalculationOfPrincipalAndInterest.PRINCIPAL;
return result;
}
/**
* 输出结果
*/
public void printResult(Float f)
{
System.out.println("*****************************");
System.out.println("输出结果为:"+f+"元");
System.out.println("*****************************");
}
}
Q3: java编程
public class Rate {
public double getRate() {
return 0.005;
}
}
____________________
public class OneYearRate extends Rate {
public double getRate(){
return 0.035;
}
}
____________________
public class TwoYearRate extends Rate {
public double getRate(){
return 0.044;
}
}
____________________
public class Customer {
double money,time;
Rate r;
public Customer(double money,double time){
this.money = money;
this.time = time;
if(this.time 1){
r = new Rate();
}else if(this.time 2){
r = new OneYearRate();
}else{
r = new TwoYearRate();
}
}
public double getInterest(){
return money*time*r.getRate();
}
public static void main(String args[]){
Customer c1 = new Customer(10000,0.5);
Customer c2 = new Customer(2000,1);
Customer c3 = new Customer(30004,3);
System.out.println("Interest of c1 "+c1.getInterest());
System.out.println("Interest of c2 "+c2.getInterest());
System.out.println("Interest of c3 "+c3.getInterest());
}
}
Q4: java编程计算存款利息,假定:利息=余额*利率 利率:活期:0. 5% 1年期:3.5% 3年期:5%
不知这样能否、、
public int getLiXi(){
System.out.print("请输入余额:");
Scanner input = new Scanner(System.in);
yuE = input.nextInt();
System.out.print("请选择1活期 / 2定期?");
int flag = input.nextInt();
switch(flag){
case 1:
return yuE*0.5%;
break;
case 2:
System.out.print("请选择定期年期(1/3):");
int nianQi = input.nextInt();
if(nianQi==1){
return yuE*3.5%;
}else if(nianQi==3){
return yuE*5%;
}else{
System.out.print("输入有误!");
}
break;
default:
System.out.print("选择有误!");
}
return 0;
}
Q5: java写两个类:信用卡和储蓄卡。储蓄卡有活期和死期和存款取款,信用卡设置额度
class xingYong{
public float e_du;
}
class chuXu{
int huoOrDie;
public void add(int e){
}
public void get(int e){
}
}
银行活期存款java代码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于java模拟银行定期存款功能、银行活期存款java代码的信息别忘了在本站进行查找喔。






