-
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
-
Driver Test SW for KEAZ64
说明: 快速掌握KEAZ64N系列单片机编程,里边有各种外设接口的开发例子,便于快速进入开发。(Quickly master KEAZ64N series single chip microcomputer programming, there are various peripheral interface development examples, easy to quickly enter the development.)
- 2020-11-24 15:59:35下载
- 积分:1
-
Thermal Cycling
The main goal of this step is to detect whether there is a mismatch of the thermal expansion
coefficients, PCB mounting problems, weak solder joints, and IC package integrity
- 2020-06-16 04:00:01下载
- 积分:1
-
报表例程、可以生成WORD报表
报表例程、可以生成WORD报表,学习研究(Report routines, WORD reports can be generated, learning and research)
- 2020-06-23 05:40:02下载
- 积分:1
-
TB
说明: 一个很好的用VC++编写的"显示多姿多彩的动画图标"源代码.(A good written using VC++ " display colorful animated icons" source code.)
- 2010-12-09 18:39:24下载
- 积分:1
-
按五次Shift键,就会出现一个功能界面通过它你可以调用网页
按五次Shift键,就会出现一个功能界面通过它你可以调用网页-Press Shift key five times, there will be a functional interface through which you can call the page
- 2023-04-19 17:00:03下载
- 积分:1
-
chaoshengbo_diatance_hc_sr_04
说明: 实现Verilog编程,实现超声波测距模块实现测距功能,并将测得的距离显示在数码管上(Verilog programming is realized, ultrasonic ranging module is realized, and the measured distance is displayed on the digital tube)
- 2020-06-17 16:40:02下载
- 积分:1
-
《小白学SAS》书中配套程序
《小白学SAS》配套材料适读人群 :SAS用户,统计、数据分析领域的相关工作人员(sas course, Readable population: SAS users, relevant staff in the field of statistics and data analysis)
- 2020-06-18 04:00:01下载
- 积分:1
-
C++图片信息隐写(可运行)
在图片末端隐藏信息,利用C++语言编程实现。(Picture information steganography.)
- 2020-06-17 06:20:02下载
- 积分:1
-
用ASM写的日历程序,代码超短,可能是世界上最精简的日历程序了。...
用ASM写的日历程序,代码超短,可能是世界上最精简的日历程序了。-written procedures for the calendar, ultrashort code, may be the world"s most streamlined procedures for the calendar.
- 2022-02-26 14:32:50下载
- 积分:1