Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Business Process Driven Database Design With Oracle PL SQL

Authors: Rajeev Kaula

1st Edition

1795532386, 978-1795532389

More Books

Students also viewed these Databases questions