?
Solved

couple of questions

Posted on 2004-04-10
7
Medium Priority
?
199 Views
Last Modified: 2010-04-01
question 1)
                   What is Design Pattern and why it is important ?
question 2 )
                   What are the essential parts of Exception Handling ?
                    I know ...try ...catch....throw...can anyone name more than this

question 3)  what is the technical term used to define the class below ?
               
class CanHash
{
  public:
     virtual bool operator == (const CanHash& ) const =0; // Compare two objects.
     virtual const char* KeyG() const =0; // Return the Key field.
 };

question 4) Can you give the difference between the two , and when you need to use whcih one ?

                             char* KeyG() const;
                             const char* KeyG() ;


               
0
Comment
Question by:gutta_naveen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
7 Comments
 
LVL 30

Expert Comment

by:Axter
ID: 10797597
Sounds like homework or Interview questions.

FYI:
It's against EE policy to do homework questions.
0
 

Author Comment

by:gutta_naveen
ID: 10833942
Hi ,

      It's very easy to ask question in a different way , that doesn't look like a Home Work Or Interview . In that case you might have ended up in answering my questions if you knew the answers. Only difference was .... i was straight unlike other's.

  Let me come to point..... i work in a corporate company...and the questions i have asked was neither Interview nor HomeWork. You are correct upto some point..... those are the questions asked in one of the exam written by my room-mate in his online courses. And the exam is also over and we were going thru question paper and were not able to figure some of the above which i asked here. One more point ...those are not an easy questions to answer.

thanks
0
 
LVL 30

Expert Comment

by:Axter
ID: 10835706
FYI:
I notice you're grading record:
B A B B
Please check out the EE grade guide lines.

>>What are the essential parts of Exception Handling ?
>> I know ...try ...catch....throw...can anyone name more than this
There's also catch all, which is catch(...)

>>what is the technical term used to define the class below ?
It's an abstract class, because of he pure virtual function.

>>Can you give the difference between the two , and when you need to use whcih one ?

//Returns a non-constant pointer and,
char* KeyG() const;// Can not modify member variables and can not call a member function that is not const

const char* KeyG() ;//Can modify member variables, but returns a constant pointer

0
 

Author Comment

by:gutta_naveen
ID: 10890760


const char* KeyG() ;//Can modify member variables, but returns a constant pointer

--->> one more point i came to know in this case is that..."const" can be used before the function only when the return type is a * or an & type . And you can store in a non-constant pointer variable.

 *  ) in pointer case , you can not change any of them
 &  ) in reference case , it gives only read access and not write

-------------------------------------------------

 could anyone tell me what is design pattern is all about.........

thanks

 
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 11135249
PAQed, with points refunded (350)

Computer101
E-E Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question