#include using namespace std; class small { private: int first; int second; public: small(int a, int b) { first = a; second = b; } int &get_max_first() { return first>=second ? first : second; } int &get_min_second() { return firstget_min_second() << endl; cout << s1->get_max_first() << endl; cout << s2->get_min_second() << endl; cout << s2->get_max_first() << endl; return 0; } int swap() { int temp; temp = s1->get_min_second(); s1->get_min_second() = s2->get_min_second(); s2->get_min_second() = temp; temp = s1->get_max_first(); s1->get_max_first() = s2->get_max_first(); s2->get_max_first() = temp; return 0; } int set_max(int a, int b) { s1->get_max_first() = a; s2->get_max_first() = b; return 0; } }; int main() { big b; b.print(); cout << "Swapping..." << endl; b.swap(); b.print(); cout << "Setting max values..." << endl; b.set_max(100,200); b.print(); return 0; }