资源简介
java课堂上的程序源代码。银行账户管理源程序。
代码片段和文件信息
/**
A bank account has a balance that can be changed by
deposits and withdrawals.
*/
public class BankAccount
{
/**
Constructs a bank account with a zero balance.
*/
public BankAccount()
{
balance = 0;
}
/**
Constructs a bank account with a given balance.
@param initialBalance the initial balance
*/
public BankAccount(double initialBalance)
{
balance = initialBalance;
}
/**
Deposits money into the bank account.
@param amount the amount to deposit
*/
- 上一篇:JAVA图书管理系统毕业设计带源码
- 下一篇:Android服务端和客户端交互源码
评论
共有 条评论