Object Oriented Design Interview Questions
- 0of 2 votes
AnswersDesign a Black-Jack poker game
- wyu277 December 04, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersGiven an abstract class A having a function sumBill(int a, int b). Now assume that you have 3 or 4 class extending class A and implementing their version of sumBill. And in various locations in the code you are making calls to sumBill with integer parameters.
- blaks November 19, 2014 in India
Later on it is identified that the parameters need to be of type double rather than int. So now one has to go refactor all the places which make a call to sumBill to pass parameters of double data type.
So the question is what could the developer had done better to avoid such a problem in the first place.
Its a design pattern question.| Report Duplicate | Flag | PURGE
CrimsonLogic Dev Lead Dev Lead Object Oriented Design - -1of 1 vote
AnswersDesign the algorithm and the system for a WebCrawler.
- JSDUDE October 27, 2014 in United States
The webcralwler will be provided millions of URLs. The webpage will be downloaded and then parsed for more URLs. If more URLs are found then they should also be downloaded and parsed.
He was interested in:
1. Scale to handle millions of URLs
2. What are the bottle necks in the system? How will you resolve them| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 2of 2 votes
AnswersDesign a vending machine
- JSDUDE October 27, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 1of 1 vote
AnswersDesign a valet parking system. Requirements of the valet parking system should be:
- LCHammer September 25, 2014 in United States for Advertising
1. Customer are given a ticket that they can use to redeem to get their vehicle back
2. Parking spots come in three sizes, small, med, large
3. Thee types of vehicles, small, med, large
-a small vehicle can park in a small, medium, and large spot
-a medium vehicle can park in a medium and large spot
-a large vehicle can park in a large spot| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 2 votes
AnswersDifference between a crash and exception.
- avinash September 20, 2014 in India for GTSC
Difference between macros and inline functions.
Mfc: message maps and virtual functions.
Different calling convention.
Late n early binding...
Garbage collector algorithm. When gc will fail to clean the memory.
How to know heap size, crash dump analysis, What is a stack n how to know stack memory size.
Commands in windbg.
Questions on Critical section, mutex, semaphores. Can we use mutex in single process and how?
Working of MSIL and JIT COMPILER.
Can a C# code, use c++ code and call kernel functions like createfile.
Areas: dot net, oops, operating systems, thread synchronization.
Difference in execution steps of c++ and c# code| Report Duplicate | Flag | PURGE
Microsoft Software Engineer / Developer Assembly C++ Data Structures Debugging Object Oriented Design Operating System Threads - 0of 0 votes
AnswerDesign a system for elevator and write all the classes and interfaces and show the relationships in between them.
- newbee September 09, 2014 in United States| Report Duplicate | Flag | PURGE
Nook Senior Software Development Engineer Object Oriented Design - 0of 0 votes
AnswersIt was part of a bigger question --a large piece of code.
- farzanmoofty August 12, 2014 in United States for Price history
Implement << operator. What are the differences of implementation as a member function and a non-member function| Report Duplicate | Flag | PURGE
Bloomberg LP Software Engineer / Developer C++ Coding Object Oriented Design - 0of 2 votes
AnswersDesign a system like friend's functionality in facebook. should have all features of facebook's friends functionality. like for each person , he can have any number of friends , he will get suggestions for new firends , showing common friends if we visits any other profile . algo should be scalable , robust .
- gopi.komanduri August 02, 2014 in United States| Report Duplicate | Flag | PURGE
Computer Scientist Algorithm Android Application / UI Design Arrays Bit Manipulation C# C++ Cache Coding Computer Architecture & Low Level Data Mining Data Structures Database Distributed Computing Dynamic Programming Hash Table Java Large Scale Computing Linked Lists Math & Computation Object Oriented Design Problem Solving Sorting SQL Stacks System Design Trees and Graphs XML - -2of 2 votes
AnswersTo design classes and methods for casino cards games, what would you consider when doing it?
- yu_stfx@hotmail.com July 30, 2014 in Canada| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersDesign Tic-tac-toe game?
- rahulkgupta July 09, 2014 in India
Mention all the classes, object that will be used in Java.| Report Duplicate | Flag | PURGE
Software AG Java Developer Object Oriented Design - 1of 3 votes
AnswersDesign a telephone directory for large ppl (he gave example like design for India). fields will be , first name , last name , number . this should be searchable with first name , last name , number as welll.
- gopi.komanduri July 04, 2014 in India
later added more complexity like do the same for organisation where even it contains designations. so this should be searchable with designations.| Report Duplicate | Flag | PURGE
Analyst Algorithm Arrays C C++ Cache Coding Computer Architecture & Low Level Data Mining Data Structures Dynamic Programming Hash Table Ideas Large Scale Computing Linked Lists Object Oriented Design Problem Solving Trees and Graphs - -1of 1 vote
AnswersWhat data tructure should be used for designing a postal system
- anonymous June 29, 2014 in United States| Report Duplicate | Flag | PURGE
Object Oriented Design - 0of 0 votes
AnswersDesign a logger class for your application? The log messages can be printed in a log file.
- learner123 June 27, 2014 in United States
Suppose you may want to provide the user the option whether he wants to print the messages in a log file or into database at runtime. How would you modify your earlier design?| Report Duplicate | Flag | PURGE
Object Oriented Design - 0of 0 votes
AnswersDifference between struct and class.
- JSDUDE June 25, 2014 in United States for LSB
When would you use one over the other
What is padding? Do both struct and class have padding| Report Duplicate | Flag | PURGE
Expedia SDE-2 Object Oriented Design - 0of 0 votes
AnswersExplain the underlying working of how inherited function gets invoked. So if Dog and Cat, inherited from Animal, inherit Eats. How does the right Eats get called for Dog/Cat
- JSDUDE June 25, 2014 in United States for LSB
private inheritance vs composition
When would you use private inheritance| Report Duplicate | Flag | PURGE
Expedia SDE-2 Object Oriented Design - 0of 0 votes
AnswersWhat is a static function? Explain in detail
- JSDUDE June 25, 2014 in United States for LSB| Report Duplicate | Flag | PURGE
Expedia SDE-2 Object Oriented Design - 0of 0 votes
AnswersSerialize and deserialize a tree.
- FauxPas June 07, 2014 in United States
Given a tree - not necessarily a binary tree - the serialize method should create a string for the tree. The deserialize method should be able to reproduce the same tree using the string derived from the serialize method.
Basically, serialize() takes in a tree and returns a string, deserialize() takes in a string and returns the tree.| Report Duplicate | Flag | PURGE
Yahoo Software Engineer / Developer Algorithm Coding Java Object Oriented Design - 2of 2 votes
AnswersDesign an HTTP downloader that caches results and doesn't block execution (i.e., enables simultaneous downloads).
- diegum June 06, 2014 in United States for iOS| Report Duplicate | Flag | PURGE
Facebook Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersHow would you design a game for chess ? Think in terms of object oriented design. What all classes and behaviors you could think of ?
- learner123 June 05, 2014 in United States| Report Duplicate | Flag | PURGE
Object Oriented Design - 0of 0 votes
AnswersA furniture can be made of material like metal, wood, .... Also there are different furniture types chair, table, sofa. A wood furniture should be tested against choaking. metal furniture is tested against fire, etc. Design these in OOAD.
- geekyjaks May 24, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Object Oriented Design - 0of 0 votes
AnswersAsked to explain the abstract factory design pattern along with its drawbacks (if any)?
- learner123 May 13, 2014 in United States| Report Duplicate | Flag | PURGE
Object Oriented Design - 0of 0 votes
AnswersDesign a Pool class and write down any interfaces that you could think? A Pool class could be a Thread Pool or memory pool, that can store resources.
- learner123 May 12, 2014 in United States| Report Duplicate | Flag | PURGE
Object Oriented Design - 0of 0 votes
AnswersThe question was:
- puneet.sohi April 28, 2014 in United States for AWS
What are general guidelines you follow while creating new classes in C++
My answer:
1. Keep variables pvt (use setter and getter methods)
2. Use reference counting to do mem management, he asked me to use shared_ptr within the class| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - 0of 0 votes
AnswersHow would one design a multi format converter that supports reading data from multiple data sources(web service, local disk, etc.). The data from the sources can be in multiple formats. The reader for each format may be different and how does one serialize this abstract data to multiple formats like image, xml etc. New readers, writers and data sources can be added later during implementation.
- sukhvinder.pal April 24, 2014 in India| Report Duplicate | Flag | PURGE
Goldman Sachs Software Architect Object Oriented Design - 1of 1 vote
AnswersIt was a design question. You have to design a game. it has different types of monsters and different weapons. hero would shoot monster. each monster would have some initial health. Each weapon would do some predefined damage to monster. when its health gets 0, monster would die/disappear. and there would be multiple levels. based on level, monster and their behavior would change.
- suresh March 05, 2014 in India| Report Duplicate | Flag | PURGE
Amazon SDE1 Object Oriented Design - 0of 0 votes
AnswersDesign a download manager. The download manager would be shipped with a browser. Detailed design of components and interaction between them.
- pretentious.bastard February 24, 2014 in United States for Windows Azure Mobile
Follow up question - What features would you add to the download manager so that it is more marketable than others.| Report Duplicate | Flag | PURGE
Microsoft SDE-2 Object Oriented Design - 0of 0 votes
AnswerHow can you implement oops features in C?
- anonymous February 18, 2014 in India| Report Duplicate | Flag | PURGE
Adobe Member Technical Staff Object Oriented Design - -2of 2 votes
AnswersHow to design an elevator system. Main thing to worry about is how would you notify the elevator that it needs to move up or down. and also if you are going to have a centralized class to control this behavior and how could you distribute the control.
- Guy February 11, 2014 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Object Oriented Design - -5of 7 votes
AnswersImplement a class to create timer object in OOP
- Guy February 10, 2014 in United States| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer Object Oriented Design