Four-operations: 使用node.js实现四则运算程序
一. 项目基本信息
项目成员: 陈旭钦, 郭鹏燕
项目仓库: https://github.com/Yanzery/Four-operations
二. PSP2.1表格
| PSP2.1 | Personal Software Process Stages | 预估耗时(分钟) | 实际耗时(分钟) |
|---|---|---|---|
| Planning | 计划 | 20 | 25 |
| · Estimate | · 估计这个任务需要多少时间 | 20 | 25 |
| Development | 开发 | 1280 | 1740 |
| · Analysis | · 需求分析 (包括学习新技术) | 40 | 55 |
| · Design Spec | · 生成设计文档 | 40 | 41 |
| · Design Review | · 设计复审 (和同事审核设计文档) | 30 | 20 |
| · Coding Standard | · 代码规范 (为目前的开发制定合适的规范) | 30 | 31 |
| · Design | · 具体设计 | 40 | 66 |
| · Coding | · 具体编码 | 1000 | 1422 |
| · Code Review | · 代码复审 | 40 | 41 |
| · Test | · 测试(自我测试,修改代码,提交修改) | 60 | 64 |
| Reporting | 报告 | 70 | 103 |
| · Test Report | · 测试报告 | 20 | 24 |
| · Size Measurement | · 计算工作量 | 20 | 21 |
| · Postmortem & Process Improvement Plan | · 事后总结, 并提出过程改进计划 | 30 | 58 |
| 合计 | 1370 | 1868 |
三. 设计实现过程及代码说明
1. 分析及设计
index.js: 主程序入口
Problem.js: 题目生成类
Fraction.js: 分数生成类
Calculate.js: 表达式计算类
2. 具体实现
(1)表达式生成


(2)分数生成

(3)题目计算

(4)主程序入口

四. 测试运行
(1)运行截图

(2)文件说明
exercises.txt: 题目文件
answers.txt: 答案文件
五. 效能分析
六. 项目小结
Four-operations: 使用node.js实现四则运算程序的更多相关文章
- Four Node.js Gotchas that Operations Teams Should Know about
There is no doubt that Node.js is one of the fastest growing platforms today. It can be found at sta ...
- 2015年最佳的15个 Node.js 开发工具
Node.js 越来月流行,这个基于 Google V8 引擎建立的平台, 用于方便地搭建响应速度快.易于扩展的网络应用.在本文中,我们列出了2015年最佳的15个 Node.js 开发工具.这些工具 ...
- Node.js高级编程读书笔记 - 4 构建Web应用程序
Outline 5 构建Web应用程序 5.1 构建和使用HTTP中间件 5.2 用Express.js创建Web应用程序 5.3 使用Socket.IO创建通用的实时Web应用程序 5 构建Web应 ...
- Understanding Asynchronous IO With Python 3.4's Asyncio And Node.js
[转自]http://sahandsaba.com/understanding-asyncio-node-js-python-3-4.html Introduction I spent this su ...
- node.js 使用 UglifyJS2 高效率压缩 javascript 文件
UglifyJS2 这个工具使用很长时间了,但之前都是在 gulp 自动构建 时用到了 UglifyJS 算法进行压缩. 最近玩了一下 UglifyJS2 ,做了一个 在线压缩javascript工具 ...
- 指令式Callback,函数式Promise:对node.js的一声叹息
原文:Callbacks are imperative, promises are functional: Node's biggest missed opportunity promises 天生就 ...
- [转] Creating a Simple RESTful Web App with Node.js, Express, and MongoDB
You can find/fork the sample project on GitHub Hey! This and all my other tutorials will soon be mov ...
- Node.js流
什么是流? 流是可以从一个源读取或写入数据到连续的目标对象.在Node.js,有四种类型的数据流. Readable - 其是用于读操作. Writable - 用在写操作. Duplex - 其可以 ...
- Node.js快速入门
Node.js是什么? Node.js是建立在谷歌Chrome的JavaScript引擎(V8引擎)的Web应用程序框架. 它的最新版本是:v0.12.7(在编写本教程时的版本).Node.js在官方 ...
随机推荐
- django 快速数据库操作,不用SQL语句
配置models文件 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import mod ...
- pandas(八)重塑和轴向旋转
重塑层次化索引 层次化索引为DataFrame的重排提供了良好的一致性操作,主要方法有 stack :将数据的列旋转为行 unstack:将数据的行转换为列 用一个dataframe对象举例 In [ ...
- CSS小知识---table表格
所用的仍是bootstrap的模板 <link rel="stylesheet" href="css/bootstrap.min.css"> < ...
- MySQL数据库表分区功能详解
1.什么是表分区? mysql数据库中的数据是以文件的形势存在磁盘上的,默认放在/mysql/data下面(可以通过my.cnf中的datadir来查看),一张表主要对应着三个文件,一个是frm存放表 ...
- React Native 常用学习链接地址
Android Studio下载http://www.android-studio.org/ 第二章:Android Studio概述(一)http://ask.android-studio.org/ ...
- 六款常见的Linux操作系统推荐
家常常可能因为工作或学习的需要,要使用个操作系统(比如Windows和Linux).大家对Windwos支持的文件系统可能比较熟悉,而对Linux操作系统所支持的文件系统也许比较陌生.下面小编为大家推 ...
- 线程的sleep()方法和yield()方法区别
1.sleep()方法给其他线程运行机会时不考虑线程的优先级,因此会给低优先级的线程以运行的机会 2.yield()方法只会给相同优先级或更高优先级的线程以运行的机会 3.线程执行sleep()方法后 ...
- DPDK l2fwd
dpdk的l2fwd主要做二层转发,代码分析如下. #include <stdio.h> #include <stdlib.h> #include <string.h&g ...
- nagios报错Error: No such CGI app - /usr/local/nagios/sbin/nagios/cgi-bin/status.cgi may not exist or is not executable by this process.
加上rewrite rewrite ^/nagios/cgi-bin/(.*)\.cgi /$.cgi break;
- html checkbox多选框语法与结构
<input name="Fruit" type="checkbox" value="" /> 用法用例 <foreach ...