登录
首页 » Visual C++ » account

account

于 2013-06-01 发布 文件大小:1KB
0 324
下载积分: 1 下载次数: 17

代码说明:

  设计一个名为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)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • myRpgGame
    这是我毕业设计所写的小程序,程序中的界面类似于魔塔,用vc6.0 mfc开发,个人测试没有什么问题(This is my small program written by graduation, the program s interface is similar to devil s tower, with vc6.0 mfc development, individual test without any problems)
    2011-05-23 10:51:04下载
    积分:1
  • graph1
    本程序是最小生成树Prime算法,希望对大家有用。(Prime)
    2009-12-06 02:49:34下载
    积分:1
  • xmz645
    西门子公司的电表规约程序开发,已经通过测试希望能给大家带来帮助(Siemens meter the Statute program development, has been tested, I hope we can bring to help)
    2012-04-10 09:29:34下载
    积分:1
  • 内存压缩解压缩JPG图像
    说明:  纯内存操作解压JPGE 很早之前收录的 并非原创 共享给大家(Pure memory operation decompression JPGE. Long ago included, not original. Here to share with you.)
    2020-06-22 07:20:01下载
    积分:1
  • cxfx
    读入一个C程序,统计程序中代码、注释和空行的行数以及函数的个数和平均行数,并利用统计信息分析评价该程序的风格。(Read into a C program, statistical program code, comments and blank lines as well as the function of the number of rows the number and average number of rows, and use statistical information analysis and evaluation of the program' s style.)
    2009-10-11 15:57:14下载
    积分:1
  • VBScript教程
    这是一个关于VBScript的教程,希望大家能有所得(This is a tutorial on VBScript, I hope you will get what)
    2005-04-05 21:59:51下载
    积分:1
  • MS_6
    这是C++Primer的书籍的源代码,包括课后习题的答案,是份很不错的代码,尤其针对初学者(This is the source code of C++Primer books, including after-school exercises, answers, were very good code, especially for beginners)
    2012-07-05 13:31:36下载
    积分:1
  • time
    自宣言型记时器,可以自定义记时方式,标题,时间长度等。(Since the Declaration type chronograph, you can customize chronograph, title, time, length and so on.)
    2013-09-02 16:43:01下载
    积分:1
  • renetence__code
    A flash prepared by the code, great reference(A flash is prepared by the code, great reference)
    2017-05-31 12:48:41下载
    积分:1
  • lianzichanglu
    量子物理中的重要教程,赵光达写的量子场论,非常实用(The importance of quantum physics tutorial written by Zhao of quantum field theory, very practical)
    2013-08-30 10:30:54下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载