07年一外企机试题

scwinter 2008-10-16 06:21:01
Opera Programming Test

For this test you are given responsibility of a couple of classes that
implement logical functions as given by a truth table.
The interface and implementation of these classes are found in files
logicalfunction.h and logicalfunction.cpp respectively.
In addition, there is a small program that tests the basic usage of the
classes, and a file testcases.h intended for use in the last task.

However, as of now these classes have a number of shortcomings, and it is your
task to correct these. First, take a look through the code and make a
quick estimate of how much time you think you will spend on each of the tasks
given below. Then, as you do the programming, record how much time
you actually spend.

TASKS:

1) The class interfaces do not follow good object-oriented design principles,
which make them bug-prone and hard to extend/subclass properly.

Improve the object-oriented design of the classes.

2) The class interfaces are almost completely undocumented.

Include proper interface documentation in the .h-file.

3) There seems to be a bug somewhere, as the test program seems to end with a
SEGV.

Find the bug, explain what is wrong, and make a working fix.

4) The class LogicalFunction only supports functions defined by a table.
For some logical functions, especially with many inputs, the truth tables may
be inconveniently large. As an example, a 10-input XOR would need 1024 rows,
whereas you could implement it by a couple of lines of C++ code.

Make modifications that makes it possible for the calling program to define
the behaviour of a LogicalFunction by providing C++ code.

5) Using your modified classes, define LogicalProcessors that are able to
inspect an 8x8 monochrome pixel grid, represented by 64 inputs, and report
whether this grid has horizontal, vertical or rotational symmetry.

Verify your LogicalProcessors by using the grids given in testcases.h as
input

If you have questions, please contact hr-china@opera.com.

We hope that you have fun!
...全文
558 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
冻结 2008-10-18
  • 打赏
  • 举报
回复
看E文,坚持不下去。
matrixdwy 2008-10-18
  • 打赏
  • 举报
回复
LZ你少两个文件啊 logicalfunction.h logicalfunction.cpp,没这两个文件做什么啊
cheidtf 2008-10-18
  • 打赏
  • 举报
回复
给本牛津字典好吗
王小工 2008-10-18
  • 打赏
  • 举报
回复
还是用灵格斯吧
wudeshou82666 2008-10-18
  • 打赏
  • 举报
回复
给我金山词霸
lily604 2008-10-17
  • 打赏
  • 举报
回复
只是一些要求
没有真正的题目啊
rebecca_oo 2008-10-17
  • 打赏
  • 举报
回复
超级讨厌看英文的东西。看来得试着去看了,也许某天笔试的时候就是全英文的
boys2002 2008-10-17
  • 打赏
  • 举报
回复
主要是考察 你的外语 水平的!!!!!



半小时读完 面试官都走光了~~~~~~~~~~~~~~~
AuroraExcuse 2008-10-17
  • 打赏
  • 举报
回复
opera的题目 公司很好 但是这个题目出的不知道在考察什么
fenghuijun135 2008-10-17
  • 打赏
  • 举报
回复
e文难度很大
sc_valentine21 2008-10-16
  • 打赏
  • 举报
回复
这个时候搬出一道07年的,还英文的,唉。没耐心看完
帅得不敢出门 2008-10-16
  • 打赏
  • 举报
回复
e文的up

65,210

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧