HELP WITH C++ PASTE INDNETED CODE PLZZ YOU HAVE TO USE THE GIVEN MAIN FUNCTION TO TEST YOUR ANSWER Q4: Continue with House class: a) Copy the previous program to a new file. Implement comparison operator overload for comparing the price of House object. b) Overload the operator > to output boolean, which support auto type conversion. c) Overload the operator <= to output boolean, which support auto type conversion. d) Overload the operator == to output boolean, which support auto type conversion. e) Overload the operator != to output boolean, which support auto type conversion. (Hint: need one argument constructor) Use following main() to test your class. int main(){ House a("1234 qcc st, Bayside, NY",1000000); House b("5678 cuny st, Bayside, NY",900000); cout<<(a>b)<1000000)<
HELP WITH C++
PASTE INDNETED CODE PLZZ
YOU HAVE TO USE THE GIVEN MAIN FUNCTION TO TEST YOUR ANSWER
Q4: Continue with House class:
a) Copy the previous program to a new file.
Implement comparison operator overload for comparing the price of House object.
b) Overload the operator > to output boolean, which support auto type conversion.
c) Overload the operator <= to output boolean, which support auto type conversion.
d) Overload the operator == to output boolean, which support auto type conversion. e) Overload the operator != to output boolean, which support auto type conversion.
(Hint: need one argument constructor)
Use following main() to test your class.
int main(){
House a("1234 qcc st, Bayside, NY",1000000);
House b("5678 cuny st, Bayside, NY",900000);
cout<<(a>b)<<endl; // print 1
cout<<(a<=b)<<endl; // print 0
cout<<(a==b)<<endl; // print 0
cout<<(b!=a)<<endl; // print 1
cout<<(a>1000000)<<endl; // print 0
cout<<(900000<=b)<<endl; // print 1
cout<<(850000==a)<<endl; // print 0
cout<<(700000!=b)<<endl; // print 1
}
ANSWER:

Step by step
Solved in 2 steps with 1 images









