class Calculator

A simple calculator class.

Provides basic arithmetic operations.

Public Members

int public_val
const int static_val

Public Methods

            
int add (int a, int b)
            
        

Adds two integers.

Parameters

a

First integer.

b

Second integer.

Returns

int The sum of a and b.

            
int subtract (int a, int b)
            
        

Subtracts the second integer from the first.

Parameters

a

First integer.

b

Second integer.

Returns

int The result of a - b.

            
int multiply (int a, int b)
            
        

Multiplies two integers.

Parameters

a

First integer.

b

Second integer.

Returns

int The product of a and b.

            
double divide (int a, int b)
            
        

Divides the first integer by the second.

Parameters

a

First integer.

b

Second integer.

Returns

double The result of a / b.

            
int mod (int a, int b)
            
        

Performs the mod operation on integers.

Parameters

a

First integer.

b

Second integer.

Returns

The result of a % b.