文件名称:Cpp1
- 所属分类:
- 控制台(字符窗口)编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2014-07-15
- 文件大小:
- 627kb
- 下载次数:
- 0次
- 提 供 者:
- 紫***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
设计一个名为Account 类。这个类包含:
(1)一个名为id 的int 型数据域,表示账户的身份号(默认值为0)。
(2)一个名为balance 的double 型数据域,表示账户余额(默认值为0)。
(3)一个名为annualInterestRate 的double 型数据域,保存当前年利率(默认值为0)。
(4)一个无实参构造函数,创建一个默认账户。
(5)id、balance 和annualInterestRate 的访问器和更改器函数。
(6)一个名为getMonthlyInterestRate()的函数,返回月利率。
(7)一个名为withDraw 的函数,从账户中支取指定金额。
(8)一个名为deposit 的函数,向账户中存入指定金额。
编写一个测试程序,它创建一个 Account 对象,其 ID 为 1122,账户余额为20000,年利率为4.5 。使用withDraw 函数取出2500 美元,使用deposit 函数存入3000 美元,然后输出账户余额、月利率和账户创建时间。-Design a class named Account. This class includes:
(1) a data field called id int type, indicating the identity of the account number (default is 0).
(2) a balance of the double data type called a domain, which means that the account balance (default is 0).
(3) a double-data domain named annualInterestRate, and save the current interest rate (default is 0).
(4) a no-argument constructor creates a default account.
(5) id, balance and annualInterestRate access and change control functions.
(6) a function named getMonthlyInterestRate () returns a monthly rate.
(7) a function named withDraw, and withdraw a specified amount from the account.
(8) a function called deposit to the account into a designated amount.
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 takes $ 2,500, $ 3,000 deposit using deposit function, and then output the account balance, the interest rate and mont
(1)一个名为id 的int 型数据域,表示账户的身份号(默认值为0)。
(2)一个名为balance 的double 型数据域,表示账户余额(默认值为0)。
(3)一个名为annualInterestRate 的double 型数据域,保存当前年利率(默认值为0)。
(4)一个无实参构造函数,创建一个默认账户。
(5)id、balance 和annualInterestRate 的访问器和更改器函数。
(6)一个名为getMonthlyInterestRate()的函数,返回月利率。
(7)一个名为withDraw 的函数,从账户中支取指定金额。
(8)一个名为deposit 的函数,向账户中存入指定金额。
编写一个测试程序,它创建一个 Account 对象,其 ID 为 1122,账户余额为20000,年利率为4.5 。使用withDraw 函数取出2500 美元,使用deposit 函数存入3000 美元,然后输出账户余额、月利率和账户创建时间。-Design a class named Account. This class includes:
(1) a data field called id int type, indicating the identity of the account number (default is 0).
(2) a balance of the double data type called a domain, which means that the account balance (default is 0).
(3) a double-data domain named annualInterestRate, and save the current interest rate (default is 0).
(4) a no-argument constructor creates a default account.
(5) id, balance and annualInterestRate access and change control functions.
(6) a function named getMonthlyInterestRate () returns a monthly rate.
(7) a function named withDraw, and withdraw a specified amount from the account.
(8) a function called deposit to the account into a designated amount.
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 takes $ 2,500, $ 3,000 deposit using deposit function, and then output the account balance, the interest rate and mont
(系统自动生成,下载前可以参看下载内容)
下载文件列表
C++实验1
........\Account.cpp
........\Account.h
........\Debug
........\.....\Account.obj
........\.....\test1.exe
........\.....\test1.ilk
........\.....\test1.pch
........\.....\test1.pdb
........\.....\vc60.idb
........\.....\vc60.pdb
........\TestAccount.cpp
........\test1.dsp
........\test1.dsw
........\test1.ncb
........\test1.opt
........\test1.plg