Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I have seen this asked many times in job interviews but I am still not sure how to answer this. I am a web developer for quite some time but I still have problem with explaining OOP and SDLC (Familiar with system development life cycle) .

How to prepare for above 2 topics for an interview point of view. Still I use both all the time during development.

I am not clear on OOP SDLC

Is there any simplest answer to both of these?

share|improve this question

migrated from stackoverflow.com Mar 6 '11 at 0:42

This question came from our site for professional and enthusiast programmers.

1  
Why is this tagged [c#]? –  BoltClock Mar 6 '11 at 0:16
    
@BoltClock Don't know what to tag :( –  pirzada Mar 6 '11 at 0:28
1  
What is precisely the question you are asked during interview? "What is SDLC?" If yes, Wikipedia article about SDLC is detailed enough to pick up some useful information for an answer during an interview, to show that you understand what is SDLC and know enough about the different phases. –  MainMa Mar 6 '11 at 1:05
    
What has not been mentioned so far, is the relationship between SDLC and OO and the different SDLCs that are out there. If you are going for a senior position the choice and issues with a given SDLC may be a question to prepare for. –  Emmad Kareem Apr 19 '12 at 20:15
add comment

4 Answers

up vote 5 down vote accepted

These would be my "off the top of my head" answers that may be revised a little under some situations:

Systems Development Life Cycle has the following main points:

  • Requirements Gathering - What is it that is needed?
  • Solution Design and Analysis - How will this be done?
  • Implementation - Build it.
  • Testing - Do we build what was needed?
  • Deployment and Maintenance - Release the system into the wild.

Object-oriented programming is the paradigm of programming where everything is an object and has methods for what can be done with an object. For example, if one were to model animals as classes then their actions like walking, swimming, and barking would be methods. There are a few principles commonly found in this paradigm:

  • Abstraction - Modeling the object in software - For example let's take the simple shape of a square. Now this could be represented by the length of a side, Cartesian co-ordinates of 4 vertices, equalities that cover an area in an XY-plane, its area, or its perimeter. Translating any one representation to another is fairly straightforward.
  • Encapsulation - Restricting access to parts of the class,e.g. private methods versus public methods. Hiding the details of an implementation is another part of this.
  • Polymorphism - A variable being of various forms, literally. Example:

There are many examples of Polymorphism in the .NET framework. One of them is the Membership provider. When you call Membership.GetUser or any other method, it calls the default provider, which is defined as a MembershipProvider class. Any derivatives (SqlMembershipProvider or other custom providers) expose the MembershipProvider interface to create a concrete implementation. You can easily switch the underlying data store without having to change any code for the Membership object.

  • Inheritance - Being able to pass along functionality as some classes may relate to each other,e.g. cats and dogs may be subclasses of Mammal.
share|improve this answer
    
Thanks very helpful. Can you explain Abstraction and Polymorphism in the simplest way please? . Your points very helpful. –  pirzada Mar 6 '11 at 1:52
    
Abstraction: Taking real examples; find common themes, relationships, patterns, activities, or structure; and generalize. (example: Chevy Silverado, a Bicycle, and a locomotive are all wheeled forms of transportation, none move effectively without the wheels turning) Polymorphism: the ability of a thing to act a certain way in a context, and then use the exact same thing in a completely different way in another context. (example apple as a seed, apple as a food) –  JustinC Mar 6 '11 at 6:13
add comment

You should imagine you're a teacher, and are teaching what OOP and the SDLC is.

If you can't, then you do you REALLY know what they are? Using a process doesn't mean you know how it works or why.

By explaining something from the perspective of a teacher, will help you solidify the knowledge in your own mind.

share|improve this answer
1  
Seems more like commentary on understanding concepts in general and doesn't answer the question. –  JeffO Apr 19 '12 at 19:41
    
I think this is a better answer than spoon feeding the concepts. The title question, after all, is "How to answer this?" And the answer to that is to answer like a teacher explaining what SDLC and OOP are to a class. The rest, the OP can look up in any of a million places, including this very site. –  Caleb Apr 19 '12 at 19:46
add comment

When answering a question in an interview, you want your answers to be detailed enough to satisfy the interviewer, yet concise in order to give you more time to move on to other questions, including your own.

For OOP, a simple statement such as:

Object-Oriented Programming is a technique where you define structures - the objects - which combine data and system behaviours in code, solving problems by creating a model of real-world concepts.

For SDLC, you might say something like:

The Software Development Life Cycle is the method by which a software development project is managed, starting with the initial idea and gathering of requirements, through to implementation and testing, and culminating in a period of maintenance before eventually being retired. It is a structured process which can be entirely linear, iterative, or both, with the ultimate goal of developing high-quality software product.

However you answer the question, avoid trying to explain the concept in too detailed a way. If your answer is concise, you are inviting the interviewer to ask additional questions, while providing too much detail can risk trapping you in a situation where you expose a weakness in your knowledge. Concise answers also show that you know what you are talking about enough to be comfortable with giving a short yet descriptive answer.

share|improve this answer
add comment

OOP in a nutshell.

You have a class to model a clock. Everything you need to know about a clock is in this class, it has a few routines that allow you to set the time, and display the time. This is Encapsulation.

But now you want a digital clock. This is a clock like you had before, but it wants to display the time in a digital rather than analog display, so you derive a new class off the original and replace the display routines to show stuff in digital format. This is Polymorphism.

And now you want an alarm clock. This does everything clock does, but it also makes a noise at set times, so you derive from the original clock class and add new routines to set and ring the alarm. This is Inheritance.

And there you have the 3 fundamentals of OOP.

Note that in all cases, you still have a clock. This is how OOP works, that you can sell someone a clock, then hand them an alarm clock and they will still be able to do 'clock' things to it like setting and telling the time.


SDLC:

This is the lifecycle of making software and delivering it to the customer. You start by figuring out what it is they want, figuring out how you're going to go about it, figuring out how to code it, figuring out why it doesn't work quite right, and then figuring out how to install it.

There's no "right" answer to "what is SDLC", but to show that you understand all aspects of creating software that the customer uses. Its to show that you understand there's more to software development than simply coding.

share|improve this answer
    
Your analogy for Polymorphism doesn't really fit. Polymorphism would be the ability to selectively ignore the specific differences in behaviour between a digital clock, an analogue clock and an alarm clock, while still being able to use all three clocks to set the time and display the time in the same way, without caring about which particular kind of clock you're using. –  Ben C Apr 19 '12 at 23:32
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.