银行账户存取钱

所属分类:Java编程
开发工具:Java
文件大小:4KB
下载次数:0
上传日期:2019-12-08 16:55:09
上 传 者洛天依00
说明:  定义一个银行帐户类BankAccount实现银行帐户的概念,在BankAccount类中定义两个变量:"帐号" (account_number) 和"存款余额"(leftmoney),再定义四个方法:"存款" (savemoney)、"取款"(getmoney) 、 "查询余额" (getleftmoney)、构造方法(BankAccount)。 最后,在main()方法中创建一个BankAccount类的对象ba,假设ba的账号为:123456,初始的存款余额为500元。首先向该账户存入1000元,再取出2000元。
(Define a bank account class bankaccount to implement the concept of bank account, define two variables in the bankaccount class: "account" and "leftmoney", and then define four methods: "savemoney", "getmoney", "getleftmoney", and "bankaccount". Finally, create a bankaccount class object BA in the main () method, assuming the account number of Ba is 123456 and the initial deposit balance is 500 yuan. First deposit 1000 yuan into the account, and then withdraw 2000 yuan.)

文件列表:
实验2 (0, 2019-11-30)
实验2\.classpath (301, 2019-11-30)
实验2\.project (383, 2019-11-30)
实验2\.settings (0, 2019-11-30)
实验2\.settings\org.eclipse.jdt.core.prefs (598, 2019-11-30)
实验2\bin (0, 2019-12-08)
实验2\bin\实验2 (0, 2019-12-08)
实验2\bin\实验2\BankAccount.class (744, 2019-12-08)
实验2\bin\实验2\实验2.class (2175, 2019-12-08)
实验2\src (0, 2019-11-30)
实验2\src\实验2 (0, 2019-12-04)
实验2\src\实验2\实验2.java (1691, 2019-12-04)

近期下载者

相关文件


收藏者