-
account
设计一个名为Account类。这个类包含:
(1)一个名为id的int型数据域,表示账户的身份号(默认值为0)。
(2)一个名为balance的double型数据域,表示账户余额(默认值为0)。
(3)一个名为annualInterestRate的double型数据域,保存当前年利率(默认值为0)。
(4)一个无实参构造函数,创建一个默认账户。
(5)id、balance和annualInterestRate的访问器和更改器函数。
(6)一个名为getMonthlyInterestRate()的函数,返回月利率。
(7)一个名为withDraw的函数,从账户中支取指定金额。
(8)一个名为deposit的函数,向账户中存入指定金额。
画出类的UML图,实现类。编写一个测试程序,它创建一个Account对象,其ID为1122,账户余额为20000,年利率为4.5 。使用withDraw函数取出2500美元,使用deposit函数存入3000美元,然后输出账户余额、月利率和账户创建时间。(Design a class named Account. This class includes: (a) a named data type int id field that indicates the account identification number (default is 0). (2) a double-called balance of data fields, which means that the account balance (default is 0). (3) a double type named annualInterestRate of data fields, save the current interest rate (default is 0). (4) a no-argument constructor creates a default account. (5) id, balance and annualInterestRate access control and change control functions. (6) a named getMonthlyInterestRate () function returns a monthly rate. (7) a function named withDraw, drawn from the account specified amount. (8) a function called deposit to the account into a designated amount. Draw a UML class diagram, the implementation class. Write a test program that creates an Account object, its ID is 1122, the account balance is 20,000, an interest rate of 4.5 . Use withDraw function out $ 2,500, $ 3,000 deposit with deposit function, and then outputs the account balance, m)
- 2013-06-01 13:21:54下载
- 积分:1
-
柴油机
说明: 数据实时监测、数据实时采集、柴油机工作探测(Data real-time monitoring, data real-time acquisition, diesel engine working detection)
- 2020-06-22 16:20:44下载
- 积分:1
-
FANUC-PMCpassword
查看Fanuc的PMC密码的工具。30I有效(PMC password View Fanuc' s tool. 30I effective)
- 2011-06-02 15:37:00下载
- 积分:1
-
OnscreenKeyboard_src
一个模拟鼠标键盘输入的例子(-An example about how to similar to the input of mouse and keyboard)
- 2003-10-21 21:22:59下载
- 积分:1
-
高校学籍管理问题设计方案
编写学生学籍,便于管理,系统中介,程序讲解如下,结果如图,(The preparation of student status, easy management, system intermediary, procedures explained as follows, the results are as follows,)
- 2017-06-11 11:09:51下载
- 积分:1
-
27796696tdxplugin
TDX plugin 这是一个实例,如何开发TDX的插件(TDX plugin)
- 2010-11-12 09:18:31下载
- 积分:1
-
jiguangcar
激光小车引脚请自行修改我靠 还要我写多少字?(Laser trolley pin please modify how much I rely want me to write the word?)
- 2013-10-30 16:39:17下载
- 积分:1
-
TYOPCClientSrc
OPC Client 源代码,支持OPC 2.0
非常有参考价值(OPC Client source code, OPC 2.0 support is very useful)
- 2009-01-23 20:49:46下载
- 积分:1
-
Three_SPWM_Inverter_xiebo
此程序为功率因数校正程序,可以直接烧录到DSP28335中,可以直接使用。(This program is a power factor correction program, which can be directly burned to the DSP 28335, and can be used directly.)
- 2019-03-01 21:33:01下载
- 积分:1
-
DIYCHM
说明: diy 软件,破解 制作个性版 fcg教程(diy software, create personalized version of fcg crack tutorial)
- 2011-04-10 21:29:37下载
- 积分:1