Options
All
  • Public
  • Public/Protected
  • All
Menu

Temperature Class It takes in a temperature (and possibly updates the stored temperature) and makes it available in string format with °C added.

import { Temperature } from '@maximva/examenopdracht-maximva'
const temperature: Temperature = new Temperature(28.25)
console.log(temperature.toString())  //"28.25 °C"

Hierarchy

  • Temperature

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

temperature

temperature: number

The temperature to print

Methods

toString

  • toString(): string
  • Returns the current provided temperature in string format with °C added

    Returns string

update

  • update(temperature: number): void
  • Update the stored temperature

    Parameters

    • temperature: number

      The temperature to print

    Returns void

Generated using TypeDoc