Question: C++ Assignment Note : Other chegg users Please don't copy . We have to create a FunnyNumber header, but I don't know how to proceed

C++ Assignment

Note : Other chegg users Please don't copy .

We have to create a FunnyNumber header, but I don't know how to proceed from now on, please edit my code. I have provided the Number header. In bold : what i have problem with. Thanks

Instructions:

Make a FunnyNumber.h header which extends Number.h, add two constructors to it

Add a void reverse() function and implement it.

Override operators + and == in FunnyNumber so they have a different behavior.

Here is Number.h

#ifndef NUMBER_H #define NUMBER_H #include  #include  #include  using namespace std; class Number { public: // Make a number with value 0 Number(); // Make a number with value val Number(string val); // Get the number's value virtual string getValue() const; // Print this number to the stream virtual void print(ostream& stream) const; // Read this number from the stream virtual void read(istream& stream); // Overload the insertion operator friend ostream& operator <<(ostream& outs, const Number& n); // Overload the extraction operator friend istream& operator >> (istream& ins, Number& n); // Operator + virtual Number operator+ (const Number& other) const; // Operator == virtual bool operator== (const Number& other) const; protected: string value; }; #endif 

What I tried for FunnyNumber.h:

#ifndef FUNNYNUMBER_H #define FUNNYNUMBER_H

#include #include #include"Number.h" #include

using namespace std;

class FunnyNumber : public Number { public: //constructors FunnyNumber(); FunnyNumber(string val);

// Operator + virtual string operator+(const FunnyNumber &other)const;

// Operator == virtual bool operator==(const FunnyNumber &other)const;

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!