Documentation

Calculadora
in package

Clase que representa una calculadora.

Tags
author

Jesús Temprano Gallego

since
19/02/2025

Table of Contents

Properties

$num1  : float
$num2  : float
$operacion  : string
$resultado  : float|null
$error  : array<string|int, mixed>|null

Methods

__construct()  : mixed
Constructor de la clase
getError()  : array<string|int, mixed>|null
getNum1()  : float
getNum2()  : float
getOperacion()  : string
getResultado()  : float|null

Properties

Methods

__construct()

Constructor de la clase

public __construct(float $num1, float $num2, string $operacion[, float|null $resultado = null ][, int|null $code = null ][, string|null $msg = null ]) : mixed
Parameters
$num1 : float

Primer número

$num2 : float

Segundo número

$operacion : string

Tipo de operación

$resultado : float|null = null

Resultado de la operación

$code : int|null = null

Código de error

$msg : string|null = null

Mensaje de error

getError()

public getError() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getNum1()

public getNum1() : float
Return values
float

getNum2()

public getNum2() : float
Return values
float

getOperacion()

public getOperacion() : string
Return values
string

getResultado()

public getResultado() : float|null
Return values
float|null

        
On this page

Search results