================================================================================
  Question 16: SmartCalculator (Simulated Method Overloading)
================================================================================

FULL QUESTION:
Create a class SmartCalculator that demonstrates simulated method overloading
in Python:

1. Implement a method add() that:
   - Adds two numbers if two are given.
   - Adds three numbers if three are given (using default arguments).
2. Implement a method multiply() that:
   - Accepts any number of arguments using *args and returns their product.
3. Implement a method process() that behaves differently based on argument type:
   - If argument is a string: prints it in uppercase.
   - If argument is a list of numbers: returns the sum.
   - If argument is an integer or float: returns its square.

SHORT QUESTION:
SmartCalculator demonstrating simulated method overloading via default arguments, *args, and type-based dispatch.

================================================================================
README & SETUP INSTRUCTIONS:
================================================================================
# Question 16: SmartCalculator (Simulated Method Overloading)

- Prerequisites: Python 3.x (Standard library only).
- Setup: None.
- How to Run: python question_16.py
- Expected Behavior: Demonstrates method dispatching for variable parameter counts and data types.

================================================================================
SOURCE CODE FILES:
================================================================================

1. question_16.py
--------------------------------------------------------------------------------
class SmartCalculator:
    def add(self, num1, num2, num3=0):
        return num1 + num2 + num3

    def multiply(self, *args):
        product = 1
        for i in args:
            product *= i
        return product

    def process(self, data):
        if isinstance(data, str):
            print(data.upper())
        elif isinstance(data, list):
            print(sum(data))

obj = SmartCalculator()

print("Addition (2 numbers):", obj.add(10, 20))
print("Addition (3 numbers):", obj.add(10, 20, 30))

print("Multiplication:", obj.multiply(2, 4, 6))

print("Process String: ", end="")
obj.process("hello world")

print("Process List  : ", end="")
obj.process([10, 20, 30])
--------------------------------------------------------------------------------
