Calculator

interface Calculator<T : Number>

A simple calculator interface

Parameters

T

the type of the number

See also

Inheritors

Functions

Link copied to clipboard
abstract fun add(a: T, b: T): T

Adds two numbers

Link copied to clipboard
abstract fun divide(a: T, b: T): T

Divides two numbers

Link copied to clipboard
abstract fun multiply(a: T, b: T): T

Multiplies two numbers

Link copied to clipboard
abstract fun subtract(a: T, b: T): T

Subtracts two numbers