1.自己写一个计算器demo
知识点:
1.System.Math.Pow() 实现乘方
2.实现计算器的运算优先级,依次调用的流程
问题:
还未实现“()”功能
解决方案
UI:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWkAAAD/CAIAAAC8UbDzAAAUZElEQVR4nO2d/29T573Hnz8if0GkSzuNVrLLkfbLtB/C1u6HwhhTjEsbr9Ci2182a9OZr7DMZVeOsSZa2+0vNE3oJlhlD9atYt0tJJhLBVOTZeXCZXxJFspcC7mOUwz+su3YW+4Pjp0T5zixP0/OOc9z/H7pLXTi+PF59eQ5H96UxLAqAAD0Dnvttdeq1eoOAADommq1yhojZMeOHcsAANAFK7Oj1TuWl5fHf38dQRBkg6zODn3vePvD6wiCIBvkH/806h22ayEIInhWZ4e+d4z9/gaCIMgGeVz7l0HvmPjoJoIgyAb5QvuXQe+wXQtBEMGzOjv0vePdC39GEATZIJ/97Z8GveMXk7cRBEE2yM1y3aB3nErfRRDE2Tn+1pmXvv780MBgp7z09eePv3Wm0/LpRzWD3mH7fxWCIGZn9zblwtg75f+b7ZQLY+/s3qZ0Wr46O/S9471L8x0y9dJX2QpfDcY6Pq2bjA8x10unN3va6eC/dfO0tkT3McIqBOmnDA0MFv94Jfvum51S/OOVoYHBTssvfmnUO5KXFwzyXmgbYzt/tvqh72dGT+s2EzuZ2/der5/aNGnfdsae93K8AoL0RYYGBh9+cvmvbx9/40c/2Tt8aO/wIf3BX98+/vCTy0MDg52W/3bxHwa9w+ipad923eDYgpg0O7bqFRDE4RkaGFy6cvHem+G9w4caP9umP7j3ZnjpysWuZoe+d/zqyr32JEPbmPfw+sev3Du8q/mnmF0nmw9e+v72lcd2Hr/3qysndzL395ONT7WOVx9c+wond7K2D5trk6FtTP+yzRf5gbfx4LYfXGoK6M+IIIhBhgYG74698dHQ9tDuXa2p0Rgcod27PhrafnfsjaGBwU7Lf5n7u0HvOHv1fntSR57YfuSt9Y+v5t1vMvfLqftnr15+eTt74oeXjT6lP9Y/uMGn9A+yb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7I/zJ7ZWr4ozKThfijgllk/o4y/srGOxKpghT+viH+SP5E/JEw5Zs/yv9M4uWbv8nI/0zPmU+KfPMXTED+Z0oMPjlC4G8C8j9Tqo1JEQJ/MX7+ZyHfGZTeWfiZ9CwjdARuBf1UdZ5HOsuSqov6c5Hk2SAc/mKc/M9q/JXSO8NZmrlc42pSaLV+Lo809+88J3k2CIc/pPzPQSB3Ltr0uikJQrZRMEskXzGYQ5KSPJuEwN8E5X+uz1++FVu1Bn9s8dzG36+9zH8nI/9zrPABZmkG46/ymwxCyLZMsjsvSZ4NUvkbjZU/1PzPZv7ALM15eJXmH3ym/CAIgmarZdv/zV2SZ4MU/o7Gy98E538ukiZckurIN3/TK+2vL5BqiPgzS/rFBZJjEX8kTBF/JEwRfyRMEX8kTBF/JEz55o/8zyReMn9fjZk/LP+z8OuXBR5ocgf6k2/+8PzPiWzYIv78CYE/JP9zIuJvsqTw9/XY+Ytx/M+JQBOUdH9DdJJy7hdurW4rMSSQsbmecPiLEfzPiST+dJ7nZjTk7QaC4aoZDQU0ydhcQzj8YfifE6mGK8VzGndbQbPJA8TfBM6dUmRsdiAE/pD8z4ks+QuaTe4dwHlFxmY3Uvn7aUb9z4nM8Zcb2w0ll7OEGBmb3cg3f3j+50SG+YfKExc1ZR8WGZvdyDd/U+x/Jo1BvvkjkXgRfyRMyfz9m/gjeRTxR8IU8UfClMLfV8QfyZ+IPxKmiD8Spog/EqaIPxKmiD8Spog/EqaIPxKmJP7+D8RVpC/E/2gsAAAAAElFTkSuQmCC" alt="" />
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms; namespace CaculationTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button_Click(object sender, EventArgs e)
{
var text=((Button)sender).Text;
if (text == "=")
{
Evaluate();
}
else
{
txtExpression.Text = txtExpression.Text + text;
}
} private void Evaluate()
{
txtExpression.Text = new Caculator().Evaluate(txtExpression.Text).ToString();
} private void button16_Click(object sender, EventArgs e)
{
txtExpression.Clear();
} }
}
Form1.cs
using System;
using System.Collections.Generic;
using System.Text; namespace CaculationTest
{
enum TokenType
{
Add,Sub,
Mul,Div,
Int,
Expo,
Start,End
} class Token
{
public TokenType Type;
public object Value; public Token(TokenType type , object value = null)
{
Type = type;
Value = value;
}
}
}
Token.cs
using System;
using System.Collections.Generic;
using System.Text; namespace CaculationTest
{
/// <summary> </summary>
abstract class Expression
{
public abstract int GetValue();
} class UnaryExpress : Expression
{
int _value; public UnaryExpress(int value)
{
_value = value;
} public override int GetValue()
{
return _value;
}
} class BinaryExpression : Expression
{
TokenType _tokenType;
int _left;
int _right; public BinaryExpression(TokenType tokenType, Expression left, Expression right)
{
_tokenType = tokenType;
_left = left.GetValue();
_right = right.GetValue();
} public override int GetValue()
{
switch (_tokenType)
{
case TokenType.Add:
return _left + _right;
case TokenType.Sub:
return _left - _right;
case TokenType.Mul:
return _left * _right;
case TokenType.Div:
return _left / _right;
case TokenType.Expo:
return Convert.ToInt32(Math.Pow(_left,_right));
default:
throw new Exception("unexceptional token!");
}
}
}
}
Expression.cs
using System;
using System.Collections.Generic;
using System.Text; namespace CaculationTest
{
/// <summary> </summary>
class Caculator
{
string _exp; int _pos;
Token _token;
int _len; public int Evaluate(string expression)
{
_exp = expression;
_len = expression.Length;
var exp = ParseExpression();
return exp.GetValue();
} Expression ParseExpression()
{
//先解析一次,解析内容存在_token中
ParseToken();
return ParseAddSub();
} //解析加减
Expression ParseAddSub()
{
//左操作数为优先级理高的运算符
var l = ParseMulDiv();
while (_token.Type == TokenType.Add || _token.Type == TokenType.Sub)
{
var t = _token.Type;
ParseToken();
var r = ParseMulDiv();//解析右操作数
l = new BinaryExpression(t, l, r);
}
return l;
} #region 老逻辑
////解析乘除
//Expression ParseMulDiv()
//{
// var l = ParseUnary();
// while (_token.Type == TokenType.Mul || _token.Type == TokenType.Div)
// {
// var t = _token.Type;
// ParseToken();
// var r=ParseUnary();
// l = new BinaryExpression(t, l, r);
// }
// return l;
//}
#endregion //解析乘除
Expression ParseMulDiv()
{
var l = ParseExpo();
while (_token.Type == TokenType.Mul || _token.Type == TokenType.Div)
{
var t = _token.Type;
ParseToken();
var r = ParseExpo();
l = new BinaryExpression(t, l, r);
}
return l;
} //解析乘方
Expression ParseExpo()
{
var l = ParseUnary();
while (_token.Type==TokenType.Expo)
{
var t = _token.Type;
ParseToken();
var r = ParseUnary();
l = new BinaryExpression(t, l, r);
}
return l;
} //解析一元表达式(目前只有单个整数)
Expression ParseUnary()
{
Expression ret = null;
if (_token.Type == TokenType.Int)
{
ret= new UnaryExpress((int)_token.Value);
} //解析完int后,移到下一个token处,即+-*/
ParseToken();
return ret;
} void ParseToken()
{
//已结束
if (_pos >= _len)
{
_token= new Token(TokenType.End);
return;
} //跳过空格
while (_exp[_pos] == ' ')
{
_pos++;
} //如果以数字开头,解析整数
if (_exp[_pos] >= '' && _exp[_pos] <= '')
{
for (int i = ; i + _pos <= _len; i++)
{
//如果以数字结尾,或者到达了数字的边界
if( i+_pos==_len||(_exp[_pos + i] < '' || _exp[_pos + i] > ''))
{
var intStr = _exp.Substring(_pos, i);
var value = int.Parse(intStr);
_token= new Token(TokenType.Int, value);
_pos += i; //解析成功后,更新当前位置
break;
}
}
}
else
{
switch (_exp[_pos])
{
case '+':
_token=new Token(TokenType.Add);
break;
case '-':
_token = new Token(TokenType.Sub);
break;
case '*':
_token=new Token(TokenType.Mul);
break;
case '/':
_token = new Token(TokenType.Div);
break;
case '^':
_token=new Token(TokenType.Expo);
break;
default:
throw new Exception("unexpected token: " + _exp[_pos]);
}
_pos++;//解析成功后,更新当前位置
}
} }
}
Calculator.cs
验证结果
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAWYAAAD7CAIAAADWy6loAAAU/ElEQVR4nO2d729b5d2H7z8if0GkpzCtINnsSFMFlC2sdC9o13WKawrJ+JUXe7HH2nRmqVZKJzmuNRVsAy8gTQoTCDlrxZ6qo0/bBANb+ogE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VAMAwAeqAQDgA9UAAPCBagAA+EA1AAB8oBoAAD5QDQAAH6gGAIAPVAMAwAeqAQDgA9UAAPCBagAA+EA1AAB8oBoAAD5QDQAAH6gGAIAPVAMAwAeqAQDgA9UAAPCBagAA+EA1AAB8oBoAAD5QDQAAH6gGAIAPVAMAwAeqAQDgA9UAAPCBagAA+KBUA4PBYPSDamAwGL5BNTAYDN+gGhgMhm9QDQwGwzeoBgaD4Zuaajx3LYvBYDAbzsMPP/z/JFO/gwFTJZMAAAAASUVORK5CYII=" alt="" />
1.自己写一个计算器demo的更多相关文章
- 用VBA写一个计算器
着急的 玩家 可以 跳过“============”部分 ======================================可以跳过的 部分 开始==================== ...
- 如何用Python写一个计算器软件 附带效果图
该计算器使用Python tkinter模块开发 效果如下图 import tkinter #导入tkinter模块 root = tkinter.Tk() root.minsize(280,500 ...
- 使用JS写一个计算器
先上效果图: 简单的加减乘除功能还是有的,所以我们就考虑怎么来实现这个功能. 根据预期效果,可以确定页面中的布局要用到table tr td. 所以先放上页面布局,table的边框宽度border,c ...
- 写一个小demo过程中遇到的各种问题 学生管理考勤系统(网页模拟)
添加与新增一些小玩意的1.0.3版本:传送门 各位带哥,这不是你们要的c++.java.c#作业哈 课上要求做个小作业,学生管理考勤系统,原本想着是个练手的好机会,结果只证实了我还是个弟中弟. 设想的 ...
- 用JS写一个计算器(兼容手机端)
先看成果:1.PC端2. 首先确立html,有哪些东西我们要知道.布局大概的样子在心里有个数 <!DOCTYPE html> <html> <head> <m ...
- 模仿Masonary写一个计算器
1.CaculatorMaker @interface CaculatorMaker : NSObject @property(nonatomic,assign)int result; -(Cacul ...
- 手写一个死锁Demo
相互持有对方锁,导致死锁 package jesse.test04; public class DeadLockSample extends Thread{ private String first; ...
- css写一个计算器叭
显示效果如图,emoji可替换为数字.
- 写一个Python的windows服务
1. 安装pywin32和pyinstaller pip install pywin32 pip install pyinstaller 2.写一个服务Demo # -*- coding: utf-8 ...
随机推荐
- SQL 设计心得、逗号分隔列表
第一: 在开始编码前.主要关注数据库里要保存什么样的数据,以级最佳的数据组织方式和内在关联方式. 第二: 使用你所知的数据库特性尽可能高效的实现数据管理.如正确的索引.数据库类型.高效的select! ...
- 测试linux和window下 jdk最大能使用多大内存
在命令行下用 java -XmxXXXXM -version 命令来进行测试,然后逐渐的增大XXXX的值,如果执行正常就表示指定的内存大小可用,否则会打印错误信息. 发现在linux先 最多用java ...
- 常用CSS HACK
常用CSS HACK IE6 3像素bug和双边距bug一样的经典 现象: IE6下浮动元素和不浮动元素之间会有3px间隙(3px bug,div.float-left + div.float-non ...
- LBA(逻辑区块地址)及PBA(物理区块地址)
LBA,全称为Logical Block Address,是PC数据存储装置上用来表示数据所在位置的通用机制,我们最常见到使用它的装置就是硬盘.LBA可以指某个数据区块的地址或者某个地址上所指向的数据 ...
- 使用自定义脚本扩展程序自动执行 VM 自定义任务
在 Build 开发者大会上推出VM 扩展程序的其中一个称为"自定义脚本扩展程序",它支持 PowerShell.如果这是您第一次访问这些博客,可能需要查看以前的博客,请单击 ...
- Ubuntu下lamp(PHP+Mysql+Apache)搭建+完全卸载卸载方法
安装apache2 sudo apt-get install apache2 安装完成,运行如下命令重启下: sudo /etc/init.d/apache2 restart 在浏览器里输入http: ...
- Windows下Oracle服务介绍
如图,截取的是11gR2下RAC其中一个节点的Oracle服务列表. oracle在处理一般事务时并不需要全部启动其后台的所有服务由于oracle服务所占用系统资源比较大,一般情况下,对于单实例的OR ...
- DataSet - DataTable - DataRow 读取 xml 文件 + 搜索
DataSet ds = XmlHelper.GetDataSetByXml(AppDomain.CurrentDomain.BaseDirectory + "/Config/ConfigN ...
- 上一篇下一篇 排序 (非ID字段排序)
网上看了很多关于"上一篇下篇"的文章,可大都是按ID排序. 实际上,很少有按ID排序的. 分享下我的单独排序字段的写法,主要分为ms sql2000 和 ms 2005及以上版本. ...
- Web Service 入门例子
在网上很常见的一个列子,实现计算器,看完总得自己练练,不然一段时间不接触又忘了 新建一个空网页,因为.net framework 4.0 不能直接建web 服务,只能在项目中添加 然后在项目中添加We ...