有没有人会做COMP1405 assignment2的作业啊

不算很难吧 ? ... 不过还是不知道

//Public Static Constants for Transaction Types
final public static int DEPOSIT = 0;
final public static int WITHDRAW = 1;
final public static int SERVICE_CHARGE = 2;

这几个东西到后面怎么用 其他都写好了 ><
 
Transaction trans = new Transaction(accountNumber, openingBalance, balance, Transaction.DEPOSIT);
 
你们老师那个example的结果
 
最初由 ???狗 发布
你们老师那个example的结果
history 和 tester那部分不太会写...
请高人指点,谢谢!
 
那个 ... BankAccount下面的printHistory怎么写呀? ..
 
代码:
public class Tester {
	public static void main(String[] args){
		
        String customerName = "Lou";

        BankAccount account1 = new BankAccount(customerName );
       
        account1.deposit(1000.0);
        account1.deposit(500.0);
        account1.withdraw(200.0);
        account1.withdraw(1200.0);
        account1.withdraw(2200.0); 

        String customerName2 = "Sue";        
        BankAccount account2 = new BankAccount(customerName2 );
       
        account2.deposit(1500.0);
        account2.withdraw(1200.0);
        account2.withdraw(200.0); 

        System.out.println(account1);
        account1.printHistory();        

        System.out.println();
        
        System.out.println(account2);
        account2.printHistory();
	}
}


public class BankAccount {
	
    public void printHistory() {
    	transactions.printHistory();
    }
}
 
哎,真羡慕这样的1405
tmd以前我为啥不是nel教呢
 
最初由 ???狗 发布
哎,真羡慕这样的1405
tmd以前我为啥不是nel教呢
你来做CFC COMP远程TA好了
 
后退
顶部