Question: Use PHP classes to code a temperature converter Objective Use PHP classes to code a temperature converter PHP Class Definition: Temperature celsiusTemp: float - fahrenTemp:
Use PHP classes to code a temperature converter

Objective Use PHP classes to code a temperature converter PHP Class Definition: Temperature celsiusTemp: float - fahrenTemp: float - kelvinTemp: float + temperature(float temperature string type): void +incrementTemp(float interval, string type): void +getCelsius(): float + getFahren(): float + getKelvin(): float +isBoiling(): string +isFreezing): string Class specifications Your constructor should take in an initial temperature and a type (C for Celsius, K for Kelvin, and F for Fahrenheit) . o The constructor should store the temperature to the appropriate variable and also perform the appropriate conversions to initialize the other two temperature types . incrementTemp should take in a interval to alter your temp and the type it's incrementing (incrementing a Celsius temperature by 10 is way different than incrementing a Fahrenheit temperature by 10) The other temperature types should be incremented based on the appropriate interval through conversion o getCelsius, getFahren, and getKelvin should all return number values format to two decimal places * . isBoilng should check if the current temperature is at or above the boiing poin - since the Celsius, Fahrenheit, and Kelvin temperatures should be equivalently the same temperature, you should only have to check one value (Celsius for example) return a string "True" or "False": this allows to printing a value more easily readable by a user . isFreezing checks is the current temperature is at or below the freezing point return a string "True" or "False": this allows printing a value more easily readable by a user
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
