-
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
-
auto-parts-management-system-in-VCPP
这是用VC++编写的汽车配件管理系统
1.数据库文件名:qpglxt 位置:(汽配管理系统\汽配管理系统qpglxt.mdb)
2.数据库类型:Access
3.连接方式:ADO
4.用户名:mrkj
5.密码:111
6.编译环境VC6.0(It is written in VC++ auto parts management system 1. Database file name: qpglxt location: ( Auto Parts Management System Auto Parts Management System qpglxt.mdb) 2. Database Type: Access 3. Connection: ADO 4. User Name: mrkj 5. Password: 111)
- 2011-04-21 19:31:19下载
- 积分:1
-
旋转编码器(EC11)
ec11旋钮编程器C语言使用说明,希望给有用的人一些帮助(Ec11 knob programmer)
- 2019-03-07 19:27:05下载
- 积分:1
-
爬虫爬取机场信息
【实例简介】采集的www.cdairport.com 网站的数据
- 2021-05-28 00:31:18下载
- 积分:1
-
与MATLAB /倍频立体校正
用于对图像极线校正的MATLAB代码基于教程对极线校正立体图像的matlab代码整改
- 2022-03-10 17:37:58下载
- 积分:1
-
Desktop
说明: opengl入门练习题,有详细说明
实验1 实验环境的熟悉(2)
实验2 OpenGl中图形的绘制(4)
实验3 基本图元绘制(6)(Introductory exercises)
- 2019-06-14 15:54:56下载
- 积分:1
-
ThreadPoolProject
说明: 通过ThreadPoolExecutor的方式,这样的处理方式让写的同学更加明确线程池的运行规则,规避资源耗尽的风险(Thread pools are not recommended to be created by Executors, but by ThreadPool Executor, which allows students to write more clearly about the rules of thread pools and avoid the risk of resource exhaustion.)
- 2020-06-17 21:00:07下载
- 积分:1
-
P2P文件组件开发说明
P2P语音组件开发说明
文件和词语说明:
zhFileOcx.ocx: 文件传输控件,此组件可以不可见,也可以可见,可以穿越防火墙进行P2P连接,速度根据网络不同而不同,一般在15KB-70KB之间。
P2PServer.exe:P2P连接服务器,此服务器用于协助组件进行P2P连接,P2PServer.exe 可以对75%以上网络进行P2P直连接,数据无需要经过服务器。25%左右的网络会通过服务器中转。
用户ID:以下例子中所用到的10001号或者10002号,是语音组件的标志,每个组件需要一个ID号来区别,每个语音组件连接P2PServer时需要告知自己是谁和需要连接谁。
- 2022-08-10 11:15:52下载
- 积分:1
-
WRK-v1.2
windows kernal research是个用于研究的操作系统源代码。使用时请阅读License.txt文本,注意仅用于学习!(Windows Research Kernel Source Code only used to research.You should agree
to the license agreement.)
- 2012-11-12 22:18:52下载
- 积分:1
-
poly
标题: 多边形游戏
时 限: 1000 ms
内存限制: 10000 K
总时限: 3000 ms
描述: 多边形游戏是一个单人玩的游戏,开始时有一个由n个顶点构成的多边形。每个顶点被赋予一个整数值,每条边被赋予一个运算符“+”或“*”。所有边依次用整数从1到n编号。
游戏第1步,将一条边删除。
随后n-1步按以下方式操作:
(1)选择一条边E以及由E连接着的2个顶点V1和V2;
(2)用一个新的顶点取代边E以及由E连接着的2个顶点V1和V2。将由顶点V1和V2的整数值通过边E上的运算得到的结果赋予新顶点。
最后,所有边都被删除,游戏结束。游戏的得分就是所剩顶点上的整数值。
输入: 输入共两行,第一行一个整数n表示顶点个数,第二行共2*n个数,分别为数字和字符。
例如:对于上图中的问题,我们可以这样按输入样例中的例子输入,数学中的“+”号代表加法,小写字母“x”代表乘法。
输出: 一个整数,计算最高得分。
输入样例: 5
10 + -1 x -2 x 3 + -8 x
输出样例: 486
(标题: 多边形游戏
时 限: 1000 ms
内存限制: 10000 K
总时限: 3000 ms
描述: 多边形游戏是一个单人玩的游戏,开始时有一个由n个顶点构成的多边形。每个顶点被赋予一个整数值,每条边被赋予一个运算符“+”或“*”。所有边依次用整数从1到n编号。
游戏第1步,将一条边删除。
随后n-1步按以下方式操作:
(1)选择一条边E以及由E连接着的2个顶点V1和V2;
(2)用一个新的顶点取代边E以及由E连接着的2个顶点V1和V2。将由顶点V1和V2的整数值通过边E上的运算得到的结果赋予新顶点。
最后,所有边都被删除,游戏结束。游戏的得分就是所剩顶点上的整数值。
输入: 输入共两行,第一行一个整数n表示顶点个数,第二行共2*n个数,分别为数字和字符。
例如:对于上图中的问题,我们可以这样按输入样例中的例子输入,数学中的“+”号代表加法,小写字母“x”代表乘法。
输出: 一个整数,计算最高得分。
输入样例: 5
10+-1 x-2 x 3+-8 x
输出样例: 486
)
- 2012-12-17 10:35:16下载
- 积分:1