Like Tree7Likes
  • 7 Post By brewbuck

This position requires key competencies such as encapsulation, inheritance, polymorph

This is a discussion on This position requires key competencies such as encapsulation, inheritance, polymorph within the General Discussions forums, part of the Community Boards category; so if you apply for a job that has that line as a requirement what exactly are you supposed to ...

  1. #1
    Registered User
    Join Date
    Sep 2011
    Posts
    71

    This position requires key competencies such as encapsulation, inheritance, polymorph

    so if you apply for a job that has that line as a requirement what exactly are you supposed to know about inheritance, polymorphism and encapsulation?

    Do you think it's about reciting definitions or just being aware of the fact that in OO languages such as C# it is possible to implicitly convert an expression of a derived type to an expression of a base type and explictly perform the reverse operation, as well as have derived classes that have members with the same name but different functionality?

    No idea about what exactly is understood by the term encapsulation. (I don't know the dictionary definition though I might be aware of the concept). Does it have to do with taking the implementation of a type/type member away from the user as much as possible? Or is it about an expression of a base type 'encapsulating' an expression of a derived type?

  2. #2
    msh
    msh is offline
    Novice
    Join Date
    Jul 2009
    Posts
    568
    Well. I'm gonna nit-pick and say that those are not competencies. Those are concepts. :P

    I'd say that you should be able to explain how your language of choice supports these concepts and what the practices for their use is.
    Disclaimer: This post shows my ignorance at the time of its making. I claim ownership of but not responsibility for all errors in it. Reference at your own peril.

  3. #3
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by y99q View Post
    so if you apply for a job that has that line as a requirement what exactly are you supposed to know about inheritance, polymorphism and encapsulation?
    I'd say you were in luck. Those are OOP 101 concepts, so presuming the job involves programming in a formal OO language such as C++, they are just asking for an absolute rock bottom minimum. A lot better than "at least 5-10 years experience with Unified Process", etc.

    Encapsulation is the fundamental concept underlying OOP.* Primarily, it refers to the ability of a class to instantiate objects that contain both state and behaviour. An example of "state" in C++ would be a member such as int size. An example of "behaviour" in C++ would be a method such as grow(), which can change the state of the object by increasing int size. Secondarily, encapsulation refers to the possibility of regulating access to the internal state of an object. Eg, rather than expose int size as public, allowing the user to do whatever with an int, you keep it private and expose method grow(). That way, you can validate and delimit the manipulation of int size, and even change int size to a float internally later without changing the public interface grow().

    However, don't walk into an interview taking my word for it, lol, because that's generally presented the other way around, such that encapsulation is primarily about "information hiding" and secondarily about internalizing behaviour. Which IMO is bassakwards if information hiding depends on the possibility of internalizing behaviour (which it does in practice).

    * maybe the reason you are unsure about the definition is that asking an OO programmer to explain encapsulation might be like asking a fish to explain water
    Last edited by MK27; 02-01-2012 at 10:04 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #4
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,236
    Other key competencies include: ability to breathe, measurable pulse. Candidates who are dead will not be accepted.
    Code:
    //try
    //{
    	if (a) do { f( b); } while(1);
    	else   do { f(!b); } while(1);
    //}

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Encapsulation Vs Abstraction
    By Rakesh Kp in forum C++ Programming
    Replies: 1
    Last Post: 09-13-2011, 02:30 AM
  2. Encapsulation in C++
    By JohnLeeroy in forum C++ Programming
    Replies: 4
    Last Post: 05-08-2011, 05:02 PM
  3. encapsulation in c
    By swaugh in forum C Programming
    Replies: 2
    Last Post: 12-01-2004, 12:37 PM
  4. Integration or Encapsulation :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 06-02-2002, 09:14 AM
  5. Encapsulation window creation
    By xds4lx in forum Windows Programming
    Replies: 1
    Last Post: 11-09-2001, 02:08 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21