Question: write a *= operator that multiplies an Even Number by another one. The operator is declared in the class, you need to implement it after

 write a *= operator that multiplies an Even Number by another

write a *= operator that multiplies an Even Number by another one. The operator is declared in the class, you need to implement it after the class declaration. Hint: This operator should NOT return a new object Code: Compile Errors Click an error to see it in code pane EvenNumberAugmentedMultiply.cpp: 23:58: error: 1include 2 using nanespace std; no EvenNumber EvenNumber::operator* (const EvenNumber&) const' member function declared in class 'EvenNumber" 5 class EvenNuber 6 public: 7 explicit EvenNumber (int n) EvenNumber EvenNumber: :operator* (const EvenNumber& other)const f value- (n % 2--0) ? n : n- 1; //must be even 10 EvenNumber& operator* (const EvenNumber& other); 12 13 14 15 16 private: 17 18; 19 20 //Do not modify anything on or above the line below this 21 YOUR CODE BELOW 22 Iwhat am I missing below? 23 EvenNumber EvenNumber: :operator(const EvenNumber& other)const 24 25 26 27 //YOUR CODE ABOVE 28 //Do not modify anything on or below the line above this 29 30 int main) 31 32 int getValue) const return value; int value; EvenNumber->value * other.value EvenNumber nl(6) EvenNumber n2 (2) EvenNumber n3 nln2; 1/should do nl *n2, then copy result 34 to n3 35 36 37 38 39 40 41 cout

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!