ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories >> Software >> Software-Design >> OOAD
 
 


 

Back to Questions Page
 
Question
what are the main underlying concepts of object orientation?
Rank Answer Posted By  
 Question Submitted By :: Guest
I also faced this Question!!   © ALL Interview .com
Answer
Mainly there are four concepts for OOAD.
1.Abstraction -grouping of data and behaviour(operations) 
into a conceptual object.
2.Encapsulation -Its the implementation mode of data 
abstraction.With encapsulation, we can accomplish data 
hiding
3.Polymorphism -Polymorphism refers to the process whereby 
an object invokes a method of another object in a common 
manner (with the same name) without understanding or caring 
how it is accomplished. 

4.Inheritance-When an object is derived from another 
object. It inherits all the properties etc
 
0
Shahir
 
 
Answer
Abstraction - Interfaces are the best examples of 
abstraction .
Encapsulation - Classes are best examples of encapsulation.

Generally we encapsulate what varies & 
we abstract commonalities...

One more thing, You should always subclass for behabiours..
you should never subclass for properties / attributes. If 
only properties vary, then you have got to encapsulate them 
in somewhere else e.g. in a class or in some collection 
object like - Properties in Java / Map 

Hope this helps..
 
0
Prasi
 
 
Question
Difference: Object Oriented Analysis (OOA) and Object
Oriented Design (OOD)?
Rank Answer Posted By  
 Question Submitted By :: Yogveer Singh
I also faced this Question!!   © ALL Interview .com
Answer
Object-Oriented Analysis (OOA) aims to model the problem 
domain, the problem to be solved, by developing an OO 
system. The source of the analysis is generally a written 
requirements statement. Object-Oriented Design (OOD) is an 
activity of looking for logical solutions to solve a 
problem by using encapsulated entities called objects.
 
0
Arul
 
 
 
Question
Comment: C++ "includes" behavior and java "imports"
Rank Answer Posted By  
 Question Submitted By :: Yogveer Singh
I also faced this Question!!   © ALL Interview .com
Answer
#include in C/C++: #include makes a compiler to copy header 
file code into a C/C++ program.
 Dis Adv:It increase the program size unnecessarly.wastage 
of memory and process time.

import in java : import statement makes JVM to go to the 
java library execute the code there at finally substitute 
the result into java program.JVM physically will not copy 
any code.

 import is efficient than #include....
 
0
Mrangababu
 
 
Question
Is class an Object? Is object a class?
Rank Answer Posted By  
 Question Submitted By :: Yogveer Singh
I also faced this Question!!   © ALL Interview .com
Answer
Class is an object.
But an object is not a class.
 
0
Anirban
 
 
Answer
object is an instance of a class or in other words object 
is a snapshot(blueprint)of a perticuler class.
class is real world object.
 
0
Kaushi
 
 
Answer
Class is a user defined data type whereas Object can be 
veiwed as a variable of class type
For example fruit is a class & mango,apple are different 
objects of class fruit.
Class can be a person whereas objects can be any existing 
person like Ram ,Shayam,Rahul etc
 
0
Shambhu Gupta
 
 
Answer
a class is a class which is an object but class is not an 
object
 
0
Shashi
 
 
Answer
Yes, class is an object but an object is not a class.
We can compare class with a factory and object with product.
A factory can be a product of another factory; but a 
product can not be a factory.
 
0
Reza
 
 
Answer
A class is a generalized template from which object
is created based on its various instances,therefore
we can consider a class as an object while vice-versa 
is not possible.
 
0
Kumar Rohit
 
 
Answer
A class is neither an object nor an object is a class.
A class is like a blue print for an object.
An object is an instance of a class.

Some people have given the right examples above and some 
more goes here:
You can consider a blue print for your house is a class. 
You cannot stay in blue print :).
The building built based on the blue print is called an 
object. You can stay in it.

Class should be treated like a "data type" and an object 
like a instance of that datatype.
for e.g., int i; you can considet int as a class and i as 
an instance of an object.
 
0
Murthy
 
 
Answer
YES class is an object whereas an object is an instance of 
a class
 
0
Anu
 
 
Answer
Class is not an object. An object is an entity that is 
allocated memory during runtime to do certain operation 
whereas Class is just a skeleton or representation of the 
object. We say design a class and not create a class. We 
can only design a class ( attributes and behaviour ).
In brief we can say class is a Type of an object.
 
0
Vasir
 
 
Answer
Going by the definition ("object is an instance of a class") -  it is clear that object IS A class type (take off "an instance of"). However, the other way round is against the correctness of definition.
 
0
Subrata
 
 
Question
What are associative classes?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
an associative class is used to model associations that 
have methods and attributes. Associative classes are 
typically modeled during analysis and then refactored 
during design.
 
2
Debalina
 
 
Answer
same operation in some classes and that classes must have 
the generalisation among them is called Associative Classes
 
0
Praveen Kumar
 
 
Question
Difference Between Attribute and Association.
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
Attribute is the property or state of a class and
association is the relationship between two classes.
 
0
Naveen Sisupalan
 
 
Answer
By Attribute be\haviour we cam\n give the relation either 
Association, Dependancy, Generalisation, Realisation
 
0
Praveen Kumar
 
 
Question
What is Object Constraint Language (OCL)?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
OCL is used to define pre conditions, post conditions and
other conditional statements in UML.
 
0
Naveen Sisupalan
 
 
Question
Explian following terms: Constraint Rules, Design by 
contract.
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
Design by contract :Design by contract, DBC or Programming 
by contract is an approach to designing computer software. 
It prescribes that software designers should define precise 
verifiable interface specifications for software components 
based upon the theory of abstract data types and the 
conceptual metaphor of a business contract.Because "Design 
by Contract" is a trademark of Eiffel Software, the 
maintainers of Eiffel, many developers will refer to it 
only as programming by contract or contract-first 
development. The principal idea of Design by Contract (DBC) 
is that a class and its clients have a contract with each 
other: The client must guarantee certain conditions before 
calling a method specialized on the class (the 
preconditions), the class guarantees certain properties 
after the call (the postconditions). If the pre- and 
postconditions are included in a form that the compiler can 
check, then any violation of the contract between caller 
and class can be detected immediately.
 
2
Debalina
 
 
Question
How to use CRC Cards for Class Design?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
CRC cards are used to idenity classes,responsibilities
(methods/behaviour) and colloboration(interaction) with 
other classes.once identified they are used to draw refined 
class diagram
 
0
Priyadharshini.m
 
 
Answer
class response collaboration
 
0
Praveen Kumar
 
 
Question
Can you think of some nice examples where *multiple* 
actors are associated with a use case ?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
ATM users(if expanded), can act as different actors for the
use of an ATM machine.

Credit card user                -------------------
   |--------------------------> | ATM machine     |
Debit card user                 -------------------
 
0
Benjamin Jacob
 
 
Question
What are the good practices to use while designing for 
reuse?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
1.Form classes as generic classes whenever it is possible.
2.Set coupling to be low when deciding the message passing
 
0
Priyadharshini.m
 
 
Question
When do you prefer to use composition than aggregation?
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
Composition is a stronger form of aggregation. If you are
sure that the life of the part is managed entirely by the
whole then you can go for composition. Without whole, the
part can't exist also.
 
0
Naveen Sisupalan
 
 
Question
Explain Class Diagram in Detail.
Rank Answer Posted By  
 Question Submitted By :: Siva
This Interview Question Asked @   Protech
I also faced this Question!!   © ALL Interview .com
Answer
Class diagram will give you a static picture of the system
irrelevant to time. It also represents the relationship
between classes.
 
0
Naveen Sisupalan
 
 
Answer
a class diagram is a type of static structure diagram,which 
describes the structure of a system.
which represents the classes, attributes, and the 
relationships between the classes.
 
2
Anu
 
 
 
Back to Questions Page
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com