Question


C++!!!!!!!!!!
please find the errors and write the CORRECT code!

58. class Three: public Two: public One protected: int X public: Three(int a, int b, int c), Two(b), Three(c) x=a; Three0;

0 0
Add a comment Improve this question Transcribed image text
Answer #1

class Three: public Two, One {
protected:
   int x;
public:
   Three(int a, int b, int c): Two(b), One(c) {
       x = a;
   }
   ~Three() {}
};

Add a comment
Know the answer?
Add Answer to:
C++!!!!!!!!!! please find the errors and write the CORRECT code! 58. class Three: public Two: public...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • // Please follow all the instructions Each of the class declarations and/or member function definitions below...

    // Please follow all the instructions Each of the class declarations and/or member function definitions below has syntax error(s). Find every error. All errors with explanation and fix the code. * Hint: You may use compiler to help you find the error. However, you need to set up the program correctly and to point out the true cause of the syntax error. Because the compiler messages are convoluted, due to the convoluted nature of language dependencies. 54. class Truck, public...

  • For Question 14 - 15, please refer to the following code snippet. 1 class Fitness 2...

    For Question 14 - 15, please refer to the following code snippet. 1 class Fitness 2 { 3 int Jumping; int Running; 12 }; 8 class Round ISAShape: public class Fitness 9 { 10 11 int Sleeping; int Eating; 13 }; 14. The following statements are TRUE based on the code snippet above, EXCEPT (A) class RoundISAShape is inheriting from class Fitness (B) class RoundISAShape is the base class for class Fitness (C) class Round ISAShape is considered as the...

  • 2 The following code has some errors. Please point out and correct them (there might be...

    2 The following code has some errors. Please point out and correct them (there might be more than 1 errors). Note: the use of const data member increment and member function print. // This code has some errors. #include using namespace std; class Increment { public: Increment( int c = 0, int i = 0); void addIncrement() const { count -= increment }; void print() const; private: int count; const int increment; }; Increment::Increment(int c, int i) { cout =...

  • ndicate the correct answers bases on the following code: public class IdentifyMyParts { public static final...

    ndicate the correct answers bases on the following code: public class IdentifyMyParts { public static final int X = 7; public int y ; public void display(){.......} } public static void main(){string [] args){ IdentifyMyParts Obj1; Obj1.X=8; Obj1.y=20; } a. IdentifyMyParts is a class b. X is a instance method c. y is an instance variable d. Obj1.X=100; e. Obj1.y=200; f. display() is a member function

  • FIX THE FOLLOWING JAVA CODE public class Errors public static main(String[] args) { float sum int...

    FIX THE FOLLOWING JAVA CODE public class Errors public static main(String[] args) { float sum int a = 27.5, b = 72.99; suma(a, b); System.out.println("Suma = %7:3b", sum); } //end main public static suma(float a, double b) { double suma suma = a + b; } }//end class

  • Hi, please the code should be good es. Onless you Thera Problem3: Write a template class Box with Three class param...

    Hi, please the code should be good es. Onless you Thera Problem3: Write a template class Box with Three class parameters representing the three dimensions (length, width and height), of the Box. Include public methods to display and set the data values as well as a function that swaps the values so that, after the swap, the first element is cast into the second and the second is cast into the Third and the third is cast first. overlaod <<...

  • For Questions 1-3: consider the following code: public class A { private int number; protected String...

    For Questions 1-3: consider the following code: public class A { private int number; protected String name; public double price; public A() { System.out.println(“A() called”); } private void foo1() { System.out.println(“A version of foo1() called”); } protected int foo2() { Sysem.out.println(“A version of foo2() called); return number; } public String foo3() { System.out.println(“A version of foo3() called”); Return “Hi”; } }//end class A public class B extends A { private char service; public B() {    super();    System.out.println(“B() called”);...

  • For Questions 1-3: consider the following code: public class A { private int number; protected String...

    For Questions 1-3: consider the following code: public class A { private int number; protected String name; public double price; public A() { System.out.println(“A() called”); } private void foo1() { System.out.println(“A version of foo1() called”); } protected int foo2() { Sysem.out.println(“A version of foo2() called); return number; } public String foo3() { System.out.println(“A version of foo3() called”); Return “Hi”; } }//end class A public class B extends A { private char service; public B() {   super();   System.out.println(“B() called”); } public...

  • S. The following code has some errors Please point out and correct them. (There are more...

    S. The following code has some errors Please point out and correct them. (There are more than five errors #ineludo <iostream> uaing std reout uning stdsiendi class Time public Time (int-o, int0) void printTime) const void setMinute(int m) const private int hour int minute Time: :Time (int h, int m) hour (h o & hour< 24) h 0 setMinute (m) Time::setMinute (int m) minute = (m >-O && m < 60) ? m : 0; void printTime () cout <...

  • Point 3 4. Find the error, correct it and write output. public class Vehicle { private...

    Point 3 4. Find the error, correct it and write output. public class Vehicle { private int wheels; private int mpg; publie Vehicle(int wh, int miles) { wheels = wh; mpg = miles; public String toString{ return ("Wheels: " + wheels +" Mpg:" + mpg); public class Car extends Vehicle { private static final int WHEELS = 4; public Car(int mpg) { public class MotorCycle extends Vehicle{ private static final int WHEELS = 2; public MotorCycle(int mpg) {

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT