2014-04-25 00:41

题目:怎么测试一支笔?(Pen?您老说的是钢笔?)

解法:这种简约而不简单的题目,实在是面试官最喜欢,面试者最头疼的类型了。面试官可以只花三秒,以一种灰常高贵冷艳的语气甩出这道题。然后头疼脑热的就是你了。怎么做呢?Brainstorming,找特征,分解问题,关联问题和特征,然后按规矩解题。我个人觉得这类题其实不是考察创意,而是考察发现问题、分析问题、解决问题的思路是否够清晰,就算解不出来也没事的。

代码:

 // 12.5 How would you test a pen?
// Answer:
// 1. A pen uses ink.
// 2. A pen usually writes on paper.
// 3. The volume of ink in the pen is usually small.
// 4. Sometimes when the pen is used for too long, we wash the pen with water and dry it.
// 5. When drawing ink from the ink bottle, we squeeze the ruber tube and releases it to draw the ink up into the pen.
// Above all the things, there are a few things to be tested:
// 1. the ruber tube which contains the ink.
// 1.a. is it elastic enough?
// 2. a very thin pipe, from which ink flows into the pen.
// 2.a. is it easily blocked?
// 2.b. does it break easily?
// 3. the upper cover, which protects the ruber tube inside it.
// 3.a. can the whorl fit tight?
// 3.b. is the cover firm enough? does it crack easily?
// 4. the tip of the pen, through which the ink flow out.
// 4.a. it is actually a pipe, does it block easily?
// 4.b. write it on different paper textures, does it write smoothly?
// 4.c. it is steel, does it rust easily?
int main()
{
return ;
}

《Cracking the Coding Interview》——第12章:测试——题目5·的更多相关文章

  1. Cracking the coding interview 第一章问题及解答

    Cracking the coding interview 第一章问题及解答 不管是不是要挪地方,面试题具有很好的联系代码总用,参加新工作的半年里,做的大多是探索性的工作,反而代码写得少了,不高兴,最 ...

  2. 《Cracking the Coding Interview》读书笔记

    <Cracking the Coding Interview>是适合硅谷技术面试的一本面试指南,因为题目分类清晰,风格比较靠谱,所以广受推崇. 以下是我的读书笔记,基本都是每章的课后习题解 ...

  3. Cracking the coding interview

    写在开头 最近忙于论文的开题等工作,还有阿里的实习笔试,被虐的还行,说还行是因为自己的水平或者说是自己准备的还没有达到他们所需要人才的水平,所以就想找一本面试的书<Cracking the co ...

  4. Cracking the coding interview目录及资料收集

    前言 <Cracking the coding interview>是一本被许多人极力推荐的程序员面试书籍, 详情可见:http://www.careercup.com/book. 第六版 ...

  5. Cracking the Coding Interview(Trees and Graphs)

    Cracking the Coding Interview(Trees and Graphs) 树和图的训练平时相对很少,还是要加强训练一些树和图的基础算法.自己对树节点的设计应该不是很合理,多多少少 ...

  6. Cracking the Coding Interview(Stacks and Queues)

    Cracking the Coding Interview(Stacks and Queues) 1.Describe how you could use a single array to impl ...

  7. 《Cracking the Coding Interview》——第12章:测试——题目6

    2014-04-25 00:53 题目:你要如何测试一个分布式银行系统的ATM机? 解法:ATM是Automatic Teller Machine,取钱的.我想了半天,没找到什么很清晰的思路,也许是因 ...

  8. 《Cracking the Coding Interview》——第12章:测试——题目4

    2014-04-25 00:35 题目:没有专门的测试工具,你要如何对一个网页进行压力测试? 解法:拼手速,拼电脑数量呗.快捷键+复制粘贴网址,狂搞一番.话说回来,有脚本语言的情况下,直接写个脚本来模 ...

  9. 《Cracking the Coding Interview》——第12章:测试——题目3

    2014-04-24 23:28 题目:玩象棋游戏,你要设计一个bool型的方法来检测一个棋子能否移动到指定位置. 解法:不同的棋子有不同的移动规则,那么应该采取棋子基类实现接口,各个棋子子类来实现的 ...

随机推荐

  1. 安卓NDK流程

    定义wrap类,声明native函数,加载库 package com.ndk.hello; public class Classs { public native String say_hello() ...

  2. MySQL入门很简单: 9 插入 更新与删除数据

    1. 插入数据:INSERT 1)为表的所有字段插入数据 第一种: 不指定具体的字段名 INSERT INTO 表名 VALUES(值1,值2,...,值n): 第二种:INSERT语句中列出所有字段 ...

  3. jwt 在.net core 2.0的使用

    jwt个人觉得更适合作共享session的传递格式,本身保密性不好,容易泄露重要信息,他的格式为头.一些用户的自定义声明.前两者的加密(公私对称密钥形式) 需要引用nuget: System.Iden ...

  4. POJ-3187 Backward Digit Sums---枚举全排列

    题目链接: https://vjudge.net/problem/POJ-3187 题目大意: 输入n,sum,求1~n的数,如何排列之后,相邻两列相加,直到得出最后的结果等于sum,输出1~n的排列 ...

  5. 关于Ubuntu下安装Win8和Win8下安装Ubuntu的注意事项

    版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/svitter/article/details/32932387 本文出自:http://blog.c ...

  6. 自己编写shave函数

    import numpy def shave(I,border=None): I = I[border[0]:I.shape[0]-border[0],border[1]:I.shape[1]-bor ...

  7. Java关键字transient和volatile小结

    转自:http://heaven-arch.iteye.com/blog/1160693 transient和volatile两个关键字一个用于对象序列化,一个用于线程同步,都是Java中比较高阶的话 ...

  8. JavaScript 十行原生代码实现复制内容到剪贴板

    十行原生代码,不引入任何 JS 库,目前大部分浏览器与移动平台都可兼容. function copyToClipboard(value, callback) { var textarea = docu ...

  9. spring-bean(xml方式管理)

    特点 每一次加载XML文件时候,都会将配置文件中包含的配置实例化. ID与name区别:name不是唯一的,但是可以使用特殊字符 Class:生成类的实例 Bean的作用域: 三种实例化方式 类的构造 ...

  10. python导包学习总结

    python初学者,对于导包纠结了不少时间,总结分享,持续前进~ Python导包的两种方法: 1.1  from 包.模块  import 方法名,调用时直接使用方法名() 1.2  from 包. ...