Discuss the general principle of exception handling in object-oriented programming.

What will be an ideal response?


The general principle of exception handling in object-oriented programming is that a method that uses data should be able to detect errors, but not be required to handle them. The handling should be left to the application that uses the object, so that each application can use each method appropriately.

Computer Science & Information Technology

You might also like to view...

In the C++ statement pay = rate * hours; the * symbol is an example of

A) an operator. B) an operand. C) a variable separator. D) syntax. E) none of the above.

Computer Science & Information Technology

What does this program do?

 // What does this program do?
 #include 
 using namespace std;

 void mystery1( char *, const char * ); // prototype

 int main()
 {
 char string1[ 80 ];
 char string2[ 80 ];

 cout << "Enter two strings: ";
 cin >> string1 >> string2;
 mystery1( string1, string2 );
 cout << string1 << endl;
 } // end main

 // What does this function do?
 void mystery1( char *s1, const char *s2 )
 {
 while ( *s1 != '\0' )
 ++s1;

 for ( ; *s1 = *s2; s1++, s2++ )
 ; // empty statement
 } // end function mystery1

Computer Science & Information Technology

What code do you write to create a special character for a trademark sign (trade), TM ?

What will be an ideal response?

Computer Science & Information Technology

A search result link to paid advertising content related to your search is called a(n) _______ .

A. sponsored link B. SEO         C. banner ad D. related link

Computer Science & Information Technology