acount
#include<iostream>
using namespace std;
class account
{
public:
int de( int i, double b, double a)
{
id = i;
balance = b;
annuleinterestrate = a;
return ;
}
int visit( int b)
{
switch (b)
{
case :cout << id;
return ;
case :cout << balance << endl;
return ;
case :cout << annuleinterestrate << endl;
return ;
}
}
int change(int b)
{
cout << "Please input the content:" << endl;
switch (b)
{
case :cin >> id;
return ;
case :cin >> balance;
return ;
case :cin >> annuleinterestrate ;
return ;
}
}
double GetMonthlyInterestRate()
{
monthlyinterestrate = annuleinterestrate/12.0;
return monthlyinterestrate;
}
double withDraw()
{
double q;
cout << "please input the number:" <<endl;
cin >> q;
balance += q;
return balance;
}
double deposit()
{
double q;
cout << "please input the number:" <<endl;
cin >> q;
balance -= q;
return balance;
}
private:
int id;
double annuleinterestrate,monthlyinterestrate,balance;
};
int main()
{
int a,b;
account acc;
acc.de( ,,0.045 ) ;
cout << "Please intput the function's number: (1 visit; 2 change; 3 GetMonthlyInterestRate;4 withDraw;5 deposit;)" << endl;
cin >> a;
switch (a)
{
case : cout << "which do you chose?(1 id;2 balance;3 annuleinterestrate)" << endl;
cin >> b;
acc.visit( b );
break;
case : cout << "which do you chose?(1 id;2 balance;3 annuleinterestrate)" << endl;
cin >> b;
acc.change( b );
break;
case : cout << acc.GetMonthlyInterestRate() << endl;
break;
case : cout << acc.withDraw() << endl;
break;
case : cout << acc.deposit() << endl;
break;
}
return ;
}

acount的更多相关文章
- Map<String,Integer>acount字符串出现的次数
- C++ 应用程序性能优化
C++ 应用程序性能优化 eryar@163.com 1. Introduction 对于几何造型内核OpenCASCADE,由于会涉及到大量的数值算法,如矩阵相关计算,微积分,Newton迭代法解方 ...
- 基于ASP.NET/C#开发国外支付平台(Paypal)学习心得。
最近一直在研究Paypal的支付平台,因为本人之前没有接触过接口这一块,新来一家公司比较不清楚流程就要求开发两个支付平台一个是支付宝(这边就不再这篇文章里面赘述了),但还是花了2-3天的时间通 ...
- iOS开发系列--Swift进阶
概述 上一篇文章<iOS开发系列--Swift语言>中对Swift的语法特点以及它和C.ObjC等其他语言的用法区别进行了介绍.当然,这只是Swift的入门基础,但是仅仅了解这些对于使用S ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(21)-权限管理系统-跑通整个系统
系列目录 这一节我们来跑通整个系统,验证的流程,通过AOP切入方式,在访问方法之前,执行一个验证机制来判断是否有操作权限(如:增删改等) 原理:通过MVC自带筛选器,在筛选器分解路由的Action和c ...
- C#设计模式
自从上次记录完“重构之道”以后,查询设计模式挺麻烦的.就打算把原先写的设计模式系列合并一下. 设计原则 使用设计模式的根本原因就是适应需求变化,提高代码的复用率,使程序更具有扩展性和可维护性. SOL ...
- Delphi容器类之---TOrderedList、TStack、TQueue、TObjectStack、TObjectQueue
TOrderedList.TStack.TQueue Contnrs单元还定义了其他三个类:TOrderedList.TStack.TQueue TOrderedList TOrderedList = ...
- 用python实现的百度音乐下载器-python-pyqt-改进版
之前写过一个用python实现的百度新歌榜.热歌榜下载器的博文,实现了百度新歌.热门歌曲的爬取与下载.但那个采用的是单线程,网络状况一般的情况下,扫描前100首歌的时间大概得到40来秒.而且用Pyqt ...
- [New Portal]Windows Azure Storage (14) 使用Azure Blob的PutBlock方法,实现文件的分块、离线上传
<Windows Azure Platform 系列文章目录> 相关内容 Windows Azure Platform (二十二) Windows Azure Storage Servic ...
随机推荐
- 云服务器 ECS Linux 系统 CPU 占用率较高问题排查思路
https://help.aliyun.com/knowledge_detail/41225.html?spm=5176.7841174.2.2.ifP9Sc 注意:本文相关配置及说明已在 CentO ...
- KFC数据测试hbase结果
两个field,一个是KFC数据 一个列放的内容是“same” 每条数据都flush SLF4J: Failed to load class "org.slf4j.impl.Static ...
- Linux下校验下载文件的完整性(MD5,SHA1,PGP)
查看: Linux下校验下载文件的完整性(MD5,SHA1,PGP) http://blog.useasp.net/archive/2014/03/29/use-md5-sha1-or-pgp-to- ...
- .NET开发必备工具之-Reflector
第一步,下载 第二步,解压缩下载的包,双击Reflector应用程序打开 第三步,设置默认程序集,可以不设定 第四步,找到你要反编译dll文件 第五步,把dll文件拷贝到方便的位置(我在桌面上新建了T ...
- C++与正态分布
正态分布(Normal distribution)又名高斯分布(Gaussiandistribution).若随机变量X服从一个数学期望为μ.方差为σ^2的高斯分布,记为N(μ,σ^2).其概率密度函 ...
- 完美的.net泛型也有特定的性能黑点?追根问底并且改善这个性能问题
完美的.net真泛型真的完美吗 码C#多年,不求甚解觉得泛型就是传说中那么完美,性能也是超级好,不错,在绝大部分场景下泛型表现简直可以用完美来形容,不过随着前一阵重做IOC时,才发现与自己预想中不一样 ...
- 解决Intellij IDEA 通过archetype创建Maven项目缓慢的问题
1.由于默认情况下,根据archetype创建maven项目会从网络下载catalog文件,导致创建maven项目缓慢 Searching for remote catalog: http://rep ...
- C#面向对象(三)接口实现多态
一.如何用接口实现多态? 1.定义一个接口. using System; using System.Collections.Generic; using System.Linq; using Syst ...
- UIWebView获得内容的高 高度自适应 宽度自适应
UIWebView获得内容的高-作出自适应高的UIWebView- (void)webViewDidFinishLoad:(UIWebView *)webView { NSString *height ...
- C#高级特性
1.接口 接口与抽象基类.抽象类与接口的不同是,抽象类不仅可以定义多态接口还可以定义一些其他的成员以及构造函数.而接口只能包含抽象成员. 抽象父类创建多态接口,只有派生类才可以.而往往很多情况下非派生 ...