Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 9101|回复: 86
打印 上一主题 下一主题

[分享] 昨天的面试问题让我感到很疑惑, 4/3/2011 我换工作的决定越来越强烈!!

[复制链接]

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

跳转到指定楼层
1#
发表于 2011-1-12 08:37 PM |只看该作者 |倒序浏览
本帖最后由 宅男-兜着走 于 2011-4-3 10:44 PM 编辑

这是我最近去的应征考试, 写给大家做分享用途。
也顺便能让那些还没应征过工作的朋友们看看
原来做篇程员还要考试的

地点: SG
公司: HEULXX (自己猜)
我第一次面试, 面试官当场写了个Method。

  1. public Rectangle getRectangle(Rectangle rec)
  2. {
  3.       if(rec !=null && rec.left == 0)
  4.          rec.right = 0;
  5.      return rec;
  6. }
复制代码
他的提问是, 这个method 在一个情况下, 会throw exception。请问是什么情况

我的回答
单单这样看我觉得没问题, 但是我回答他: 如果 left 还没set 的话, 可能会throw null exception 吧。
他什么也没说,我也不知道我的答案是对还是错

  1. class person
  2. {
  3.     person mother;
  4.     person father;
  5.     string name, ic;
  6.     int age;
  7.    
  8.     public person(person mom, person dad, string name, string ic, int age)
  9.    {
  10.         .....
  11.    }

  12.     static person[] peoples;   

  13.    public static void main(string[] args)
  14.    {
  15.       ...... your code......
  16.    }
  17. }

  18. // write a method to find grand children
  19. List<Person> getGrandchildren(Person p)
  20. {
  21.     ..... method code .....
  22. }
复制代码
这个是笔试, 他要我写出个 Method. 找出孙子。



虽然我有写, 但是写到觉得不是很好, 如果是你们怎么回答??


第二个公司:
地点: SG
公司: EDMX.XXX

问题:

  1. //write a program to display this shape.
  2. 1
  3. 1 2
  4. 1 2 3
  5. 1 2 3 4
  6. 1 2 3 4 5
复制代码
我的回答:

  1. for(int i = 1; i <= 5; i ++)
  2. {
  3.      string str = "";
  4.      for(int j = 1 ; j <= i; j++)
  5.     {
  6.        str += j;
  7.     }
  8.     Console.WriteLine(str);
  9. }
复制代码
我错误的回答:

  1. for(int i = 1; i <= 5; i ++)
  2. {
  3.      for(int j = 1 ; j <= i; j++)
  4.     {
  5.        Console.WriteLine(j);
  6.     }
  7.    
  8. }
复制代码
紧张杀死人!!!!!

最近跟一间公司申请了当 PHP Web Programmer,
公司名: SPX
地点: SG

问题:
Web Developer Application > Step 2 - Test Instructions
Objective
1.        This is meant to test your proficiency in designing and developing a Web application.
2.        Once you're done, you can navigate to the Submit page to submit your résumé and your answers.
What You Need To Do
1.        You are to design and implement a simple blog.
2.        Try to limit your effort to 4 days - we do not wish to take up too much of your time.
3.        Make sure you state all your assumptions in your code.
4.        Pages that you need to produce
•        Blog entries list (this is the home page)
•        Post a Blog entry.
•        View a Blog entry
The Functional Specifications
1.        Overview
•        The blog is publicly viewable.
•        The blog is updated by a blog Owner.
•        You do not need to implement a log-in for the Owner. Bonus if you do.
•        Each blog entry can have multiple comments by other Users.
        User Registration
•        You do not need to implement any form of User registration or log-in.
•        State your assumptions how multiple Users can post Comments.
        Blog entries list (this is the home page)
•        Show number of comments for each entry
•        Show date of each entry
•        Show the Title and part of the Body
        View a Blog entry
•        Display the entry Title and Body.
•        Blog entries need not be editable or deletable. Bonus if you do.
•        Associated Comments appears here.
•        Post a Comment form appears here.
        Blog Comments
•        Each blog entry can have multiple comments by other Users.
•        Comments do not have to be threaded. Bonus if you do.
        Optional features
•        Search, Archive, RSS feeds, Sorting options, User registration, Interactive User Interfaces
•        Support for GUI editing or HTML codes in the Body.
What you need to submit
1.        PHP for code, MySQL for database.
2.        You are required to submit 1 zipped file, "answer.zip". Make sure that answer.zip contains
1.        All the necessary files for us to run your application. If you're using a framework, please include the entire framework as well.
2.        All the necessary SQL statements and any other information for us to re-create the database you're using.
3.        We may contact you should we run into problems duplicating your environment.
What we are looking out for
1.        Your design of the database tables
2.        How you write and organize code that is easy to read.
3.        How you comment your code
As a bonus, we would also like to see
1.        Use of MVC
2.        Use of CakePHP framework
3.        Clever reuse of components
4.        Efficient code, efficient database calls


我的答案在这里, 用了 NO-IP host 了。 总共花了 3 天半的时间做,写程式 1天, 设计2天半  
http://urjunior.3utilities.com/blogproject/posts/


就在今天 21/1/2011 终于回复我去面试了。 值得高兴下。

11/2/2011 找到工作了, 但是不知道薪水会不会太少


就在 4/3/2011 我换工作的决定越来越坚定, 我不喜欢坐着没事情,等放工。
我要投身 软件业!!!




收藏收藏0

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

2#
发表于 2011-1-12 08:38 PM |只看该作者
保留 ..................


回复

使用道具 举报

19

主题

0

好友

1052

积分

黄金长老

Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8Rank: 8

3#
发表于 2011-1-12 09:31 PM |只看该作者
看不懂。。。。。。。。


回复

使用道具 举报

17

主题

1

好友

2255

积分

白金长老

Rank: 10

4#
发表于 2011-1-12 09:32 PM |只看该作者
看不明你要表达什么,可是第一个code 第三line的 不是&  是 &&。


回复

使用道具 举报

17

主题

1

好友

2255

积分

白金长老

Rank: 10

5#
发表于 2011-1-12 09:36 PM |只看该作者
我试过要考一个小时的试全部subjeective,一共20 pages。神经。。。。。 而且全部很detail 的问题


回复

使用道具 举报

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

6#
发表于 2011-1-13 12:06 AM |只看该作者
回复 4# 街头混混


    抱歉, 我写错
    但是 & , && 不是出 Error 的重点。
    我的表达能力搞到你不明白问题 ??
  
    我的也是 Subjective 问题, 不过才 10 题左右。 最后还当场写个method 问你问题。 明天应该也是要做类似的test 吧 -.-|||
   
    20 题太离谱了。


回复

使用道具 举报

2

主题

0

好友

251

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

7#
发表于 2011-1-13 12:11 AM |只看该作者
本帖最后由 shippo 于 2011-1-13 12:15 AM 编辑

如果这个Rectangle 是System.Drawing.Rectangle
以下的code不会throw exception,因为根本不能运行。

  1. public Rectangle getRectangle(Rectangle rec)
  2. {
  3. if(rec !=null & rec.left == 0) //应该是 .Left ,“&”虽然也行不过减慢了执行速度。
  4.          rec.right = 0;                     
  5. //一样应该是.Right,还有.Left 和 .Right 只是readonly.
  6. //在这里要改变.Right的方法只能set Width=0 了.
  7. return rec;                           
  8. //如果不算以上的错误,一个0 width 的 Rectangle,还是很奇怪。
  9. //除非Rectangle 是 自己写的struct.
  10. }
复制代码


回复

使用道具 举报

17

主题

1

好友

2255

积分

白金长老

Rank: 10

8#
发表于 2011-1-13 12:41 AM |只看该作者
回复  街头混混


    抱歉, 我写错
    但是 & , && 不是出 Error 的重点。
    我的表达能力 ...
宅男-兜着走 发表于 2011-1-13 12:06 AM



    不是二十题,是二十面满满的问题。。。。。。


回复

使用道具 举报

17

主题

1

好友

2255

积分

白金长老

Rank: 10

9#
发表于 2011-1-13 12:45 AM |只看该作者
都不会throw exception吧? 你都没注明要throw。


回复

使用道具 举报

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

10#
发表于 2011-1-13 12:48 AM |只看该作者
回复 7# shippo


    lol!! 他什么也没说, 我要求给我detail, 知道 Rectangle class 是如何,他说REC 的class perfect!!
    而且你竟然猜想是 dotnet 哦

    我猜想应该是没标准答案的吧。

    第二题那个我想不通, 怎么样子找到一组人是 “孙子”。
   
    class 内有记载 Parent 这题很乱水下


回复

使用道具 举报

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

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-10-28 03:22 AM , Processed in 0.119091 second(s), 27 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部