/*write an overloaded findMAX function that:
returns the maximum two integers
returns the maximum of float point integers
returns the maximum of three integers*/
#include <iostream>
using namespace std;

class MaxFinder {
public:
    // Method to find max of two integers
    int findMAX(int a, int b) {
        return (a > b) ? a : b;
    }

    // Method to find max of two floats
    float findMAX(float a, float b) {
        return (a > b) ? a : b;
    }

    // Method to find max of three integers
    int findMAX(int a, int b, int c) {
        int max = (a > b) ? a : b;
        return (max > c) ? max : c;
    }
};

int main() {
    MaxFinder maxFinder;
    int choice;

    cout << "Choose an option:\n";
    cout << "1. Max of two integers\n";
    cout << "2. Max of two floats\n";
    cout << "3. Max of three integers\n";
    cout << "Enter your choice (1-3): ";
    cin >> choice;

    switch (choice) {
        case 1: {
            int a, b;
            cout << "Enter two integers: ";
            cin >> a >> b;
            cout << "Maximum is: " << maxFinder.findMAX(a, b) << endl;
            break;
        }
        case 2: {
            float a, b;
            cout << "Enter two float numbers: ";
            cin >> a >> b;
            cout << "Maximum is: " << maxFinder.findMAX(a, b) << endl;
            break;
        }
        case 3: {
            int a, b, c;
            cout << "Enter three integers: ";
            cin >> a >> b >> c;
            cout << "Maximum is: " << maxFinder.findMAX(a, b, c) << endl;
            break;
        }
        default:
            cout << "Invalid choice!" << endl;
    }

    return 0;
}
