Question: Exercises | 7 2 1 / / Line 1 / / Line 2 / / Line 3 / / Line 4 / / Line 5

Exercises |721
//Line 1
//Line 2
//Line 3
//Line 4
//Line 5
//Line 6
//Line 7
//Line 8
//Line 9
//Line 10
//Line 11
//Line 1
//Line 2
//Line 3
//Line 4
//Line 5
//Line 6
//Line 7
//Line 8
//Line 9
//Line 10
-
//Line 1
//Line 2
//Line 3
//Line 4
//Line 5
//Line 6
//Line 7
//Line 8
//Line 9
//Line 10
//Line 11
//Line 12
1
0
5.
d. A class can have more than one destructor. (5)
e. Both constructors and destructors can have parameters. (5)
2. Find the syntax errors in the following class definition. (1,2,5)
class mystery
public;
void print () const;
void setXY (double, double) ;
int add();
double mystery();
private:
double x;
double y;
3. Find the syntax errors in the following class definition. (1,2,5)
class temp
public:
bool isEqual ();
print () const;
void temp(int =0, int =0);
private:
int first;
int second;
4. Find the syntax errors in the following class definition. (1,2,5)
class secret
public:
set (int x, int y);
get (int& x, int& y);
int multiply();
void print () const;
secret (int =0, int =0) const;
private:
int num1;
int num2;
Find the syntax errors in the following class definition. (1,2,5)
class discover ()
public:
void set(string, int, int);
void print () const;
discover () ;
discover(string, int, int);
bool discover(string, int, int);
//Line 1
//Line 2
//Line 3
//Line 4
//Line 5
//Line 6
//Line 7
//Line 8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!