文件名称:Account
介绍说明--下载内容均来自于网络,请自行研究使用
一、实验名称:银行账户模拟
二、实验目的:这道题的主要目的是加深同学们对于面对对象编程中继承理解
三、实验内容:
创建一个银行账户的继承层次,表示银行的所有客户。所有的客户都能在他们的银行账户中存钱、取钱。任务主要如下:
(1)创建Account类,作为基类。Account类应该包含帐户余额,并提供构造函数;向账户中余额加钱的方法;减少账户中余额的方法;获取当前帐户余额的方法。
(2)创建Account类的派生类:储蓄账户SavingAccount类,除去基类Account的所有功能外,储蓄账户还应该具有新的特性。储蓄帐户应该提供一个计算利息的成员函数和将利息加到帐户余额上的操作。
(3)创建Account类的派生类:支票帐户CheckingAccount类,与储蓄账户不同的是,它没有利率的计算,但是它会在每笔交易后收取一定的交易费用。它需要重新定义基类Account中的成员函数,当每笔交易完成时,在帐户余额中减去交易金额。
(4)在提供上述方法时有出错情况的处理,比如帐户余额不足等情况。-First, the experiment name: Bank Account Demo Second, the purpose of the experiment: The main purpose of this question is to deepen the students to understand object-oriented programming, inheritance III Experiment: Create a hierarchy of bank accounts, indicating that all bank customers. All the customers can save money in their bank accounts, withdraw money. The main tasks are as follows: (1) Create Account class as a base class. Account class should contain account balances, and provide a constructor add money to the account balance method method of reducing the account balance acquisition method of the current account balance. (2) create a derived class Account class: savings account SavingAccount class, remove all the functionality of the base class Account, the savings account should also have new features. Savings account should provide a calculation of interest and the interest of the member function is added to the operating account balance on. (3) create a derived class Acc
二、实验目的:这道题的主要目的是加深同学们对于面对对象编程中继承理解
三、实验内容:
创建一个银行账户的继承层次,表示银行的所有客户。所有的客户都能在他们的银行账户中存钱、取钱。任务主要如下:
(1)创建Account类,作为基类。Account类应该包含帐户余额,并提供构造函数;向账户中余额加钱的方法;减少账户中余额的方法;获取当前帐户余额的方法。
(2)创建Account类的派生类:储蓄账户SavingAccount类,除去基类Account的所有功能外,储蓄账户还应该具有新的特性。储蓄帐户应该提供一个计算利息的成员函数和将利息加到帐户余额上的操作。
(3)创建Account类的派生类:支票帐户CheckingAccount类,与储蓄账户不同的是,它没有利率的计算,但是它会在每笔交易后收取一定的交易费用。它需要重新定义基类Account中的成员函数,当每笔交易完成时,在帐户余额中减去交易金额。
(4)在提供上述方法时有出错情况的处理,比如帐户余额不足等情况。-First, the experiment name: Bank Account Demo Second, the purpose of the experiment: The main purpose of this question is to deepen the students to understand object-oriented programming, inheritance III Experiment: Create a hierarchy of bank accounts, indicating that all bank customers. All the customers can save money in their bank accounts, withdraw money. The main tasks are as follows: (1) Create Account class as a base class. Account class should contain account balances, and provide a constructor add money to the account balance method method of reducing the account balance acquisition method of the current account balance. (2) create a derived class Account class: savings account SavingAccount class, remove all the functionality of the base class Account, the savings account should also have new features. Savings account should provide a calculation of interest and the interest of the member function is added to the operating account balance on. (3) create a derived class Acc
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Account\account\account.cbp
.......\.......\account.depend
.......\.......\account.h
.......\.......\accounttest.cpp
.......\.......\bin\Debug\account.exe
.......\.......\obj\Debug\accounttest.o
.......\实验报告.doc
.......\account\obj\Debug\C\Users\Administrator\Desktop\课件\C++\第六次作业
.......\.......\...\.....\.\.....\.............\.......\....\C++
.......\.......\...\.....\.\.....\.............\.......\课件
.......\.......\...\.....\.\.....\.............\Desktop
.......\.......\...\.....\.\.....\Administrator
.......\.......\...\.....\.\Users
.......\.......\...\.....\C
.......\.......\bin\Debug
.......\.......\obj\Debug
.......\.......\bin
.......\.......\obj
.......\account
Account