C++ to complete program using C++ compiler
Consider the definition of the following class: class fruit
public:
fruit():
fruit(string c, double w);
void setData(string c, double w);
string getColor() const;
double getWeight() const;
void printData() const;
bool compare(const fruit& anotherFruit) const;
private:
string color;
double weight;
o Write the definition of the constructor with no arguments so that the member variables are set to default values Write the definition of o the constructor with arguments so that the member variables are set according to the parameters. Write the definition of each of the accessor functions to return the member variable Write the definition of the mutator function to set the member variables. Write the definition of the function compare to compare two fruits, use weight and color Write a test program (main function to test accessor functions, mutator function, and compare function Here is a sample run for two fruit objects: fruit1 and fruit2 color and weight are red and 0.5 and green and 0.75 respectively.
fruit1 color: Red weight: 0.5
fruit2 color: Green weight: 0.75
fruit1 = fruit2