找回密码
 FreeOZ用户注册
查看: 4358|回复: 19
打印 上一主题 下一主题

[求职信息] 一道Logic test求解

[复制链接]
跳转到指定楼层
1#
发表于 14-4-2010 11:52:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
在做一个logic test,碰到一到题目没头绪:
A payroll report is produced for each pay period that shows:
•        The amount paid by each department for each of three classes of employees
•        The amount paid by each division for each of its departments
•        The total payroll for each division of the company

Which of the following alphabetical input sequences will minimise the data stored by the program?
1)        Class within Department within Division
2)        Division within Department within Class
3)        Employee within Department within Division
4)        Employee within Class within Division

题目看得比较晕,哪位大侠知道啥意思?高分伺候。
回复

使用道具 举报

2#
发表于 14-4-2010 12:26:37 | 只看该作者
company>division>department>class>employee...

A..

评分

参与人数 1威望 +20 收起 理由
tanliyoung + 20 谢谢分享!

查看全部评分

回复

使用道具 举报

3#
发表于 14-4-2010 12:31:25 | 只看该作者
if the class you mean is kind of rank or title. so they may share some common things.
I would say, division within department within Class
回复

使用道具 举报

4#
 楼主| 发表于 14-4-2010 12:37:01 | 只看该作者
回复

使用道具 举报

5#
发表于 14-4-2010 12:44:59 | 只看该作者
A) is really bad design, if you do OO, the object you created, say employee, will contain the instance of superclass, in the memory or to some extend program. it will use heap to store the reference beside the other thing just need stack. it's also bad design for programming against actual behavior instead interface. acctually employee just need some attribute to identify where this obj belongs to.
回复

使用道具 举报

6#
 楼主| 发表于 14-4-2010 12:45:11 | 只看该作者
原帖由 nyjjack 于 14-4-2010 12:31 发表
if the class you mean is kind of rank or title. so they may share some common things.
I would say, division within department within Class


能简单分析一下不,谢谢
回复

使用道具 举报

7#
发表于 14-4-2010 12:49:16 | 只看该作者
原帖由 tanliyoung 于 14-4-2010 12:37 发表


能不能给个简单的分析过程:)

就是英语,没啥逻辑测试啊
The amount paid by each department for each of three classes of employees
department付给每个class的employee的工资数量
The amount paid by each division for each of its departments
每个division付给每个department的数量,注意its,说明是division里面的department
The total payroll for each division of the company
company里的每个division的总工资。

还有工资嘛,肯定从大的部门往小的部门一路发下去,最后到个人。
回复

使用道具 举报

8#
 楼主| 发表于 14-4-2010 12:51:17 | 只看该作者
原帖由 hobtack 于 14-4-2010 12:49 发表

就是英语,没啥逻辑测试啊
The amount paid by each department for each of three classes of employees
department付给每个class的employee的工资数量
The amount paid by each division for each of its dep ...


这也是我觉得奇怪的地方,没看出这个题目和软件开发职位有啥关系
回复

使用道具 举报

9#
发表于 14-4-2010 12:54:07 | 只看该作者
it's talking about OO design mode!!!
if you can't even think about design mode.
you will hardly get that role
回复

使用道具 举报

10#
 楼主| 发表于 14-4-2010 12:56:14 | 只看该作者
原帖由 nyjjack 于 14-4-2010 12:54 发表
it's talking about OO design mode!!!
if you can't even think about design mode.
you will hardly get that role


愿闻其详。能不能得到职位是一回事,我学习一下也好。
回复

使用道具 举报

11#
发表于 14-4-2010 12:56:59 | 只看该作者
不是搞软件的,不懂啥是OO。
回复

使用道具 举报

12#
发表于 14-4-2010 15:18:57 | 只看该作者
2)
4 tables or you can treat them as 4 models:
Employee Table
Class Table
Department Table
Division Table
---------------------
Employee Table
EmployeeId
EmployeeName
Payroll
ClassId

Class Table
ClassId
ClassName
DepartId

Department Table
DepartmentId
DepartmentName
DivisionId

Division Table
DivisionId
DivisionName
回复

使用道具 举报

13#
发表于 14-4-2010 15:56:33 | 只看该作者
ok, the question is asking about calc the payroll.
according to the structure, each class may have different payroll cost, the same as department and division. but the share the common thing : payrollcost. for this. create interface that contain the payrollcost, let's say Ipayroll. back to the structure, divison contains department, department contains employees. and employee will have 3 different class.
based on these things, division and department should have different costcenter. Class basecost: Ipayroll. (can contain 3 class attributes) then warped by class department and division. so at the end of day. employee class will contain obj from an interface. by given the attributes, it can caculate the payroll. in the memory, only 1 reference.
回复

使用道具 举报

14#
 楼主| 发表于 14-4-2010 16:05:49 | 只看该作者
原帖由 nyjjack 于 14-4-2010 15:56 发表
ok, the question is asking about calc the payroll.
according to the structure, each class may have different payroll cost, the same as department and division. but the share the common thing : payrol ...


觉的你有点把问题搞复杂了。因为我做了其他的题目,都很容易,这个题目属于一类题目,应该不是很难。只是我不是很明白他想做什么而已。
回复

使用道具 举报

15#
发表于 14-4-2010 19:25:57 | 只看该作者
有不选A的吗?说说理由看
回复

使用道具 举报

16#
发表于 14-4-2010 19:55:37 | 只看该作者
我选二
回复

使用道具 举报

17#
发表于 14-4-2010 21:47:31 | 只看该作者
俺肯定选A。
回复

使用道具 举报

18#
发表于 14-4-2010 23:01:35 | 只看该作者

回复 #9 nyjjack 的帖子

nyjjack不要瞎说,这个deisgn pattern 有什么关系啊。
回复

使用道具 举报

19#
发表于 14-4-2010 23:12:04 | 只看该作者

回复 #1 tanliyoung 的帖子

问题是怎样是输入方式可以达到最高的空间效率。
最理想的状况是不需要任何多余的存储,三个变量,一个class,一个department,一个division,按照A 方式即可,输入一个扔掉一个。

评分

参与人数 1威望 +20 收起 理由
tanliyoung + 20 谢谢分享!

查看全部评分

回复

使用道具 举报

20#
发表于 15-4-2010 09:04:23 | 只看该作者
option 2: as I said, if you have a good design. not only it will condense the data stored in your file system, but also increase your loadbalance in your runtime.
if I was in your shoes, that's what I thought.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 27-8-2026 22:36 , Processed in 0.027665 second(s), 34 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表