-
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
-
jisuanqi3
这是个计算器
是和微软有区别的
大家可以(This is a calculator and Microsoft is the difference between the U.S. could have)
- 2007-09-18 09:22:27下载
- 积分:1
-
program
说明: 餐饮企业的管理系统主要包括前台管理、后台管理、财务管理、报表打印等功能(Catering enterprise management system, including front desk management, backstage management, financial management, printing statements)
- 2008-11-26 17:51:25下载
- 积分:1
-
chap3-src
这是一个俄罗斯方块的游戏,是用C语言编的(This is a Tetris game, is to use C-series)
- 2008-04-02 21:33:08下载
- 积分:1
-
skyblue_Rect
这是一款俄罗斯方块游戏,用Visual C++编程实现。(This is a Tetris game, with the Visual C++ programming.)
- 2013-05-18 16:18:28下载
- 积分:1
-
duotaixingshiyan
多态性实验,强烈建议大家来下载(Polymorphism of the experiment, we strongly recommend you to download)
- 2009-01-01 11:05:30下载
- 积分:1
-
DDMSVAR03
dd markov switching var code
- 2018-04-28 21:47:34下载
- 积分:1
-
user defined scalars
用户自定义标量udf,Fluent模拟。(the udf of user defined scalars)
- 2017-07-25 11:47:48下载
- 积分:1
-
sushu
该代码的功能是将1到任意数中所有的素数选择并输出(failed to translate)
- 2013-05-02 10:59:07下载
- 积分:1
-
zbsrc
作弊器(212KB) (Cheating devices (212KB))
- 2009-06-10 17:30:34下载
- 积分:1