文件名称:Class-accessor
介绍说明--下载内容来自于网络,使用问题请自行百度
编写一个类,描述银行账户,包括收入、支出和账户余额三种属性,同时包括对这三种属性的读、写的访问器方法,这三种属性都定义为私有的。
该类定义的银行账户还能够通过自己的收入和支出自动计算账户余额。对于账户余额只能读取,自动计算,但不能够直接赋值,也就是不能够写。
编写一个测试类,输入收入和支出项,打印账户余额。
-Write a class that describes bank accounts, including income, expenses and account balances three attributes, while including these three attributes read and write access methods, these three attributes are defined as private. This class defines a bank account can also automatically calculate the account balance through their own income and expenditure. For read-only account balances, calculated automatically, but can not be directly assigned, that is not able to write. Write a test class, enter the income and expenditure items, print account balance.
该类定义的银行账户还能够通过自己的收入和支出自动计算账户余额。对于账户余额只能读取,自动计算,但不能够直接赋值,也就是不能够写。
编写一个测试类,输入收入和支出项,打印账户余额。
-Write a class that describes bank accounts, including income, expenses and account balances three attributes, while including these three attributes read and write access methods, these three attributes are defined as private. This class defines a bank account can also automatically calculate the account balance through their own income and expenditure. For read-only account balances, calculated automatically, but can not be directly assigned, that is not able to write. Write a test class, enter the income and expenditure items, print account balance.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Class accessor.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.