| 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  |
| 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..  |
| 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.  |
| 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....  |
| 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.  |
| 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.  |
| 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  |
| Shambhu Gupta |
| |
| |
| Answer | a class is a class which is an object but class is not an
object  |
| 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.  |
| 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.  |
| 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.  |
| Murthy |
| |
| |
| Answer | YES class is an object whereas an object is an instance of
a class  |
| 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.  |
| 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.  |
| 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.  |
| Debalina |
| |
| |
| Answer | same operation in some classes and that classes must have
the generalisation among them is called Associative Classes  |
| 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.  |
| Naveen Sisupalan |
| |
| |
| Answer | By Attribute be\haviour we cam\n give the relation either
Association, Dependancy, Generalisation, Realisation  |
| 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.  |
| 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.  |
| 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  |
| Priyadharshini.m |
| |
| |
| Answer | class response collaboration  |
| 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 -------------------  |
| 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
 |
| 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.  |
| 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.  |
| 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.  |
| Anu |
| |
| |
|
| |
|
Back to Questions Page |