登录
首页 » Visual C++ » account

account

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

  • 2
    说明:  Visual C++角色扮演游戏程序设计之CG合成 游戏编程的第2步,CG合成的源代码(Visual C++ role-playing games designed CG synthesis Game Programming Step 2, CG source code for the synthesis of)
    2010-01-22 14:31:42下载
    积分:1
  • computer_design
    该程序能够实现计算器程序设计,采用C++编程,来自C++程序设计原理与实践。(The program can achieve calculator program design, using C++ programming, program design from C++ Principles and Practice)
    2014-02-19 14:34:59下载
    积分:1
  • STACK
    用C语言编写的堆栈接口,适用于各种环境,提供接口: STACK *initStack(int MaxRoom) void destroyStack(STACK **spp) void resetStack(STACK *sp) Boolean isStackEmpty(STACK stack) Boolean isStackFull(STACK stack) Boolean push(STACK *sp, USER_TYPE data) Boolean pop(STACK *sp, USER_TYPE *data) Boolean readTop(STACK stack, USER_TYPE *data) (C language implementation of the stack)
    2013-07-22 10:59:32下载
    积分:1
  • games
    小精灵游戏,C++的课程设计的作业。关于游戏的初步学习(little games of a small program )
    2020-07-04 16:20:02下载
    积分:1
  • RB20140704
    无线呼叫器设计,公司一直在用,上来和大家分享下,希望大家可以相互就到有用的东西(Wireless pager design, the company has been in use, come and share with you, I hope you can respect each other to something useful)
    2014-07-04 22:48:02下载
    积分:1
  • OpenFOAM用户指南-5.0
    说明:  openfoam用户指南,涉及计算流体力学的一本书,涉及openfoam的操作说明(openfoam a book in order to programme with openfoam in CFD)
    2019-05-27 07:49:40下载
    积分:1
  • TraDER
    this file shows how to connect to an mt4 server from a web service
    2020-06-25 18:40:01下载
    积分:1
  • Draw1
    Draws lines, polygons, rectangles. The user selects color and drawing function through a menu bar and clicks different points to draw the object.
    2010-03-15 11:31:42下载
    积分:1
  • Snake_C
    说明:  贪吃蛇源码c++实现,经典游戏编程,适合爱好者学习(Snake Source c++ implementation, the classic game programming for fans to learn)
    2010-04-25 17:39:12下载
    积分:1
  • SQLite3Develop
    Sqlite3 的确很好用。小巧、速度快。但是因为非微软的产品,帮助文档总觉得不够。这 些天再次研究它,又有一些收获,这里把我对 sqlite3 的研究列出来,以备忘记。(Sqlite3 really good use. Small, fast. But for the Microsoft products, always feel that not enough to help document. This Some day to study it, and have some harvest, here I study on SQLite3 list, to forget.)
    2012-09-25 17:13:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载