⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 transactions.java

📁 Java 程序设计教程(第五版)EXAMPLESchap04源码
💻 JAVA
字号:
//********************************************************************//  Transactions.java       Author: Lewis/Loftus////  Demonstrates the creation and use of multiple Account objects.//********************************************************************public class Transactions{   //-----------------------------------------------------------------   //  Creates some bank accounts and requests various services.   //-----------------------------------------------------------------   public static void main (String[] args)   {      Account acct1 = new Account ("Ted Murphy", 72354, 102.56);      Account acct2 = new Account ("Jane Smith", 69713, 40.00);      Account acct3 = new Account ("Edward Demsey", 93757, 759.32);      acct1.deposit (25.85);      double smithBalance = acct2.deposit (500.00);      System.out.println ("Smith balance after deposit: " +                          smithBalance);      System.out.println ("Smith balance after withdrawal: " +                           acct2.withdraw (430.75, 1.50));      acct1.addInterest();      acct2.addInterest();      acct3.addInterest();      System.out.println ();      System.out.println (acct1);      System.out.println (acct2);      System.out.println (acct3);   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -