登录
首页 » Visual C++ » account

account

于 2013-06-01 发布 文件大小:1KB
0 177
下载积分: 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 个回复

  • source2
    sample for programming use main
    2017-08-15 15:57:20下载
    积分:1
  • CAL_DAY
    读取两日期,并算两个日期间的天数。示范日期类型的操作。 (read two dates, and count the period of two days. Model date type of operation.)
    2005-06-08 09:19:34下载
    积分:1
  • 仿真&程序
    基于单片机的智能路灯照明控制顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶顶(Intelligent street lamp lighting)
    2018-05-20 10:21:16下载
    积分:1
  • PMCHW_MoM(compleX
    矩量法程序,用fortran语言编写的传统矩量法求解立方体的RCS的程序(FortranA Program for Solving RCS of Cubes by Traditional Moment Method Written in Fortran Language)
    2021-04-07 15:09:01下载
    积分:1
  • cPP_5.12
    本程序主要完成多用途不同质量单位,长度单位的双向转换功能(This procedure mainly complete multi-purpose different quality unit, the unit length of bidirectional conversion function)
    2013-01-12 17:19:21下载
    积分:1
  • VMware(1)
    说明:  it is useless, i am very sorry
    2020-06-15 22:35:01下载
    积分:1
  • test1
    C++关于位运算的小程序,哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈(C++ bit computing on small programs, ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha)
    2016-09-12 10:37:15下载
    积分:1
  • Tetris
    简单实现俄罗斯方块的源代码,使用C++编写,基于cocos2d-x 3.0alpha1编写(Simple implementation of Tetris source code)
    2015-03-05 11:06:12下载
    积分:1
  • CAAKcNurbsPluginFrm_20200430
    说明:  CATIA CAA Nurbs plugin
    2020-11-09 14:09:46下载
    积分:1
  • wpecification-enumerators
    Implement the base class of the control panel
    2017-03-30 02:29:45下载
    积分:1
  • 696518资源总数
  • 104384会员总数
  • 26今日下载