#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的更多相关文章

  1. Map<String,Integer>acount字符串出现的次数

  2. C++ 应用程序性能优化

    C++ 应用程序性能优化 eryar@163.com 1. Introduction 对于几何造型内核OpenCASCADE,由于会涉及到大量的数值算法,如矩阵相关计算,微积分,Newton迭代法解方 ...

  3. 基于ASP.NET/C#开发国外支付平台(Paypal)学习心得。

        最近一直在研究Paypal的支付平台,因为本人之前没有接触过接口这一块,新来一家公司比较不清楚流程就要求开发两个支付平台一个是支付宝(这边就不再这篇文章里面赘述了),但还是花了2-3天的时间通 ...

  4. iOS开发系列--Swift进阶

    概述 上一篇文章<iOS开发系列--Swift语言>中对Swift的语法特点以及它和C.ObjC等其他语言的用法区别进行了介绍.当然,这只是Swift的入门基础,但是仅仅了解这些对于使用S ...

  5. ASP.NET MVC5+EF6+EasyUI 后台管理系统(21)-权限管理系统-跑通整个系统

    系列目录 这一节我们来跑通整个系统,验证的流程,通过AOP切入方式,在访问方法之前,执行一个验证机制来判断是否有操作权限(如:增删改等) 原理:通过MVC自带筛选器,在筛选器分解路由的Action和c ...

  6. C#设计模式

    自从上次记录完“重构之道”以后,查询设计模式挺麻烦的.就打算把原先写的设计模式系列合并一下. 设计原则 使用设计模式的根本原因就是适应需求变化,提高代码的复用率,使程序更具有扩展性和可维护性. SOL ...

  7. Delphi容器类之---TOrderedList、TStack、TQueue、TObjectStack、TObjectQueue

    TOrderedList.TStack.TQueue Contnrs单元还定义了其他三个类:TOrderedList.TStack.TQueue TOrderedList TOrderedList = ...

  8. 用python实现的百度音乐下载器-python-pyqt-改进版

    之前写过一个用python实现的百度新歌榜.热歌榜下载器的博文,实现了百度新歌.热门歌曲的爬取与下载.但那个采用的是单线程,网络状况一般的情况下,扫描前100首歌的时间大概得到40来秒.而且用Pyqt ...

  9. [New Portal]Windows Azure Storage (14) 使用Azure Blob的PutBlock方法,实现文件的分块、离线上传

    <Windows Azure Platform 系列文章目录> 相关内容 Windows Azure Platform (二十二) Windows Azure Storage Servic ...

随机推荐

  1. PHP函数spl_autoload_register()用法和__autoload()介绍(转)

    详细出处参考:http://www.jb51.net/article/29624.htm 又是框架冲突导致__autoload()失效,用spl_autoload_register()重构一下,问题解 ...

  2. google对js延迟加载方案的建议

    浏览器在执行JavaScript代码时会停止处理页面,当页面中有很多JavaScript文件或代码要加载时,将导致严重的延迟.尽管可以使用defer.异步或将JavaScript代码放到页面底部来延迟 ...

  3. 一款基于jQuery的支持鼠标拖拽滑动焦点图

    记得之前我们分享过一款jQuery全屏广告图片焦点图,图片切换效果还不错.今天我们要分享另外一款jQuery焦点图插件,它的特点是支持鼠标拖拽滑动,所以在移动设备上使用更加方便,你只要用手指滑动屏幕即 ...

  4. 如何设计App登录模块?

    1.熟悉目前常见的手机APP登陆方式 ① 账号登陆(手机.邮箱) ② 第三方登陆(微信,QQ,微博) ③ 一键快捷登录(工具类,如不记单词) ④ 游客登陆(bbs) ⑤ demo测试登陆(如友盟等) ...

  5. JS 解析Xml

    loadXML = function (xmlString) { var xmlDoc = null; //判断浏览器的类型 //支持IE浏览器 if (!window.DOMParser & ...

  6. 1.7.4.1 Function Queries-函数查询

    1 . Function Queries 函数查询使你可以使用一个或者多个数字字段的实际的值生成一个关联的得分(score),函数查询支持DixMax,eDisMax,标准的查询解析. 函数查询使用函 ...

  7. Windows OpenVPN Client and tls-auth

    The official Windows OpenVPN client does not seem to work properly with the tls-auth option if a key ...

  8. ios-为银行卡号格式化 每隔四位添加一个空格

    -(NSString *)formatterBankCardNum:(NSString *)string { NSString *tempStr=string; NSInteger size =(te ...

  9. Java SortedSet接口

    该SortedSet的接口扩展集Set并声明了一组按升序排序的行为.除了通过集定义的那些方法中,SortedSet接口声明总结于下表的方法: 有几种方法没有任何条目包含在调用Set的时候抛出一个NoS ...

  10. Amazon教程:刚买就降价!避免损失,申请PRICE MATCH(价格保护)的方法

    Amazon的商品价格波动频繁,虽然老白通常都在价格较低的时机向大家推荐,但是经常有降了又降的情况,刚下的单还没到手就又降价了,这种滋味肯定不好受.Amazon客服明确告诉老白一周内降价都可以申请PR ...