文件名称: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
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。