OOP Problems to use for Coding Tests during interviews

后端 未结 9 2091
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-31 12:00

As a second interview I get people to sit down and write code...I try to make the problem really technology independent.

My programming problems that I have don\'t reall

9条回答
  •  迷失自我
    2021-01-31 12:44

    ideally, you want to present a problem that appears difficult, but has a simple, elegant, obvious solution if you think in OO terms

    perhaps:

    • we need to control access to a customer web site
    • each customer may have one or more people to access the site
    • different people from different customers may be able to view different parts of the site
    • the same person may work for more than one customer
    • customers want to manage permissions based on the person, department, team, or project

    design a solution for this using object-oriented techniques


    one OO solution is to have a Person, a Customer, an Account, and AccountPermissions, where the Account specifies a Person and a Customer and an optional Parent Account. the use of a recursive Account object collapses the otherwise cumbersome person/team/department/project structure a direct ERD solution might yield

提交回复
热议问题