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                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Software Design  >>  OOAD
 
 


 

 
 Design Patterns interview questions  Design Patterns Interview Questions
 UML interview questions  UML Interview Questions
 OOAD interview questions  OOAD Interview Questions
 Software Design Tools interview questions  Software Design Tools Interview Questions
 Requirements Management interview questions  Requirements Management Interview Questions
 Project Planning interview questions  Project Planning Interview Questions
 Project Management interview questions  Project Management Interview Questions
 Technical Writer interview questions  Technical Writer Interview Questions
 Software Design AllOther interview questions  Software Design AllOther Interview Questions
Question
What is the use of Operator Overloading?
 Question Submitted By :: Siva
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the use of Operator Overloading?
Answer
# 1
Operator Overloading helps users/developers use a particular
class in an intuitive manner for different kind of
operations logically possible on the class. 
It's used for ease of code read and maintainability.

e.g. Date 'b' can be subtracted from another instance of
Date, say 'a', to get the difference in number of days
between the two days.
So, you would overload the subtraction operator '-' for the
Date class accordingly.
Date a("07/04/2008);
Date b("05/04/2008);

//operator overoading for '-' for Date
//returns number of days
int Date::operator-(const Date& rhsDate)
{
   //wotever logic
   return <number of days between the (this) date and rhsDate>
}
 
Is This Answer Correct ?    0 Yes 0 No
Ben Jacob
 

 
 
 
Other OOAD Interview Questions
 
  Question Asked @ Answers
 
Why is planning too much up front a mistake in an OOSAD project? Infosys3
What is the use of Operator Overloading? Protech1
Is class an Object? Is object a class? Protech3
What is guard condition? Syntel3
How to resolve many to many relationship? Protech3
What are the Design Patterns you know. Protech1
Difference: 'uses', 'extends', 'includes' Protech4
What are the good practices to use while designing for reuse? Protech1
When do you prefer to use composition than aggregation? Protech1
How do you represent static members and abstract classes in Class Diagram? Protech1
What are the four phases of the Unified Process ? Protech3
What are associative classes? Protech2
Differentiate between Aggregation and containment?  1
What do you mean by Realization? Protech1
Can you think of some nice examples where *multiple* actors are associated with a use case ? Protech1
What is SRD(System Requirement document), FSD (Functional Specification Document), RSD (Requiremnet specific document)? If these are different document wat are there contents? HP1
Explian following terms: Constraint Rules, Design by contract. Protech1
Suppose a class acts an Actor in the problem domain, how to represent it in the static model?  2
Difference: Activity Diagram and Sequence Diagram Protech2
Difference: Object Oriented Analysis (OOA) and Object Oriented Design (OOD)? Protech4
 
For more OOAD Interview Questions Click Here 
 
 
 
 
 
   
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