day104(6.24)
来源:互联网 发布:Linux改变所有文件权限 编辑:程序博客网 时间:2024/04/30 19:04
我想说最近的代码吸收一也不好,是不是考虑下,不要再继续了,先个个击破了啊,思考。。不然又盲目
day104-day107,都在这里,没新东西,暂时下不去了。不能pass啊
import banking.*;
public class TestBanking {
public static void main(String[] args) {
Bank bank = new Bank();
Customer customer;
Account account;
//
// Create bank customers and their accounts
//
System.out.println("Creating the customer Jane Smith.");
bank.addCustomer("Jane", "Simms");
//code
System.out.println("Creating her Savings Account with a 500.00 balance and 3% interest.");
//code
System.out.println("Creating the customer Owen Bryant.");
//code
customer = bank.getCustomer(1);
System.out.println("Creating his Checking Account with a 500.00 balance and no overdraft protection.");
//code
System.out.println("Creating the customer Tim Soley.");
bank.addCustomer("Tim", "Soley");
customer = bank.getCustomer(2);
System.out.println("Creating his Checking Account with a 500.00 balance and 500.00 in overdraft protection.");
//code
System.out.println("Creating the customer Maria Soley.");
//code
customer = bank.getCustomer(3);
System.out.println("Maria shares her Checking Account with her husband Tim.");
customer.setAccount(bank.getCustomer(2).getAccount());
System.out.println();
//
// Demonstrate behavior of various account types
//
// Test a standard Savings Account
System.out.println("Retrieving the customer Jane Smith with her savings account.");
customer = bank.getCustomer(0);
account = customer.getAccount();
// Perform some account transactions
System.out.println("Withdraw 150.00: " + account.withdraw(150.00));
System.out.println("Deposit 22.50: " + account.deposit(22.50));
System.out.println("Withdraw 47.62: " + account.withdraw(47.62));
System.out.println("Withdraw 400.00: " + account.withdraw(400.00));
// Print out the final account balance
System.out.println("Customer [" + customer.getLastName()
+ ", " + customer.getFirstName()
+ "] has a balance of " + account.getBalance());
System.out.println();
0 0
- day104(6.24)
- 6.24
- 6.24
- 6.24
- 6.24
- 6.24
- 6.24博客
- java 6.24
- Linux2.6.24内核移植
- csapp2e 家庭作业 6.24
- ununtu14安装ipset-6.24
- 6.24资讯遍历
- 源码编译MySQL5.6.24
- android 6.24通知
- gctf-webshell相关 6.24
- EL和JSTL-6.24
- C复习笔记(6)-6.24
- C++ primer 习题练习:6.24
- Android提高开发效率的一些资料
- linux 命令英文全称
- 学习BluePill源码笔记-3
- zb的生日
- Linux netfilter 学习笔记 之九 ip层netfilter的连接跟踪模块代码分析
- day104(6.24)
- mysql
- 黑马程序员 java高新技术 类加载器
- 对sdcard的一些操作
- 【Espruino】NO.14 温湿度传感器DHT11
- Block(1)
- 高校网站疏漏,安全问题堪忧
- <算法复习>排序之一---冒泡排序
- html enctype的 MIME 类型