-
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
-
单片机工具,在单片机的设计中有很大的用处,大家下载!
微控器工具,在MCU设计中大有使用,尽情下载!-Microcontroller tools, in the MCU design much use, you download!
- 2023-07-29 10:30:04下载
- 积分:1
-
perl语言编写实现浮点格式数据加减乘除的程序
说明: 若将数据表示为浮点数格式,即有exponent和mantissa两部分,用perl语言编写实现浮点格式数据加减乘除的程序。(测试时与编程语言提供的浮点数运算进行比较,包括代码文件和设计测试报告)(If the data is expressed in floating-point format, there are two parts: exponent and mantissa. Perl language is used to write the program of data addition, subtraction, multiplication and division in floating-point format. (compare floating-point arithmetic provided by programming language during test, including code file and design test report))
- 2020-05-12 11:54:54下载
- 积分:1
-
heat
说明: 几个计算热导率的in文件,使用了不同方法(Some in file for calculating thermal conductivity)
- 2020-06-01 14:35:20下载
- 积分:1
-
查找文件夹内所有文件并列出
查找文件夹内所有文件并列出- Searches in the folder all documents to juxtapose
- 2022-01-25 23:48:59下载
- 积分:1
-
frmGoodsReturn
说明: 利用C#语言与vs开发工具实现了一个,简单的桌面贪吃蛇游戏(A simple desktop snake-eating game is implemented by using C# language and vs development tools.)
- 2020-06-25 05:40:02下载
- 积分:1
-
LMS
LMS算法的程序,针对于正弦信号加噪声进行自适应滤波处理的程序,程序正确,(LMS algorithm procedures, for the sinusoidal signal plus noise filtering process, the program is correct,)
- 2021-03-27 16:19:12下载
- 积分:1
-
Pham_Van_project_summary_report
项目工作总结报告范文,项目的前期市场调研总结等例子,对项目管理人员有帮助(Pham Van project summary report)
- 2010-09-03 14:20:50下载
- 积分:1
-
shusheguanli
能帮助宾馆和学校学生宿舍管理员能进行来客的登记管理。(Hotels and schools can help students in dormitories administrator can carry out visitor registration management.)
- 2009-09-26 21:49:14下载
- 积分:1
-
2d_ex_1
this is fortran napl simulator example done by EPA
- 2019-01-15 06:33:59下载
- 积分:1