• +91 9971497814
  • info@interviewmaterial.com

OOP Interview Questions Answers

OOP Interview Questions Answers

Question - 1 : - What is multithreading?

Answer - 1 : - Multithreading is the mechanism in which more than one thread run independent of each other within the process.

Question - 2 : - What are the steps involved in designing?

Answer - 2 : - Before getting into the design the designer should go through the SRS prepared by the System Analyst. The main tasks of design are Architectural Design and Detailed Design. In Architectural Design we find what are the main modules in the problem domains Detailed Design we find what should be done within each module.

Question - 3 : - Differentiate between a template class and class template.

Answer - 3 : - Template class: A generic definition or a parameterized class not instantiated until the client provides the needed information. It’s jargon for plain templates. Class template: A class template specifies how individual classes can be constructed much like the way a class specifies how individual objects can be constructed. It’s jargon for plain classes.

Question - 4 : - What is meant by “method-wars”?

Answer - 4 : - Before 1994 there were different methodologies like Rumbaugh, Booch, Jacobson, Meyer etc who followed their own notations to model the systems. The developers were in a dilemma to choose the method which best accomplishes their needs. This particular span was called as “method-wars”

Question - 5 : - How many ways can an argument be passed to a subroutine?

Answer - 5 : - An argument can be passed in two ways. They are Pass by Value and Passing by Reference. Passing by value: This method copies the value of an argument into the formal parameter of the subroutine. Passing by reference: In this method, a reference to an argument (not the value of the argument) is passed to the parameter.

Question - 6 : - What is the difference between superclass and subclass?

Answer - 6 : - A super class is a class that is inherited whereas sub class is a class that does the inheriting.

Question - 7 : - Differentiate Aggregation and containment?

Answer - 7 : - Aggregation is the relationship between the whole and a part. We can add/subtract some properties in the part (slave) side. It won’t affect the whole part. Best example is Car, which contains the wheels and some extra parts. Even though the parts are not there we can call it as car. But, in the case of containment the whole part is affected when the part within that got affected. The human body is an apt example for this relationship. When the whole body dies the parts (heart etc) are died.

Question - 8 : - List out some of the object-oriented methodologies.

Answer - 8 : - Object Oriented Development (OOD) (Booch 1991,1994). Object Oriented Analysis and Design (OOA/D) (Coad and Yourdon 1991). Object Modeling Techniques (OMT) (Rumbaugh 1991). Object Oriented Software Engineering (Objectory) (Jacobson 1992). Object Oriented Analysis (OOA) (Shlaer and Mellor 1992). The Fusion Method (Coleman 1991).

Question - 9 : - Whether unified method and unified modeling language are same or different?

Answer - 9 : - Unified method is convergence of the Rumbaugh and Booch. Unified modeling lang. is the fusion of Rumbaugh, Booch and Jacobson as well as Betrand Meyer (whose contribution is “sequence diagram”). Its’ the superset of all the methodologies.

Question - 10 : - What do you mean by analysis and design?

Answer - 10 : - Analysis: It is the process of determining what needs to be done before how it should be done. In order to accomplish this, the developer refers the existing systems and documents. So, simply it is an art of discovery. Design:It is the process of adopting/choosing the one among the many, which best accomplishes the users needs. So, simply, it is compromising mechanism.

OOP Contributors

krishan

Share your email for latest updates

Name:
Email:

Our partners