Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have included my code for the conversions but I need help putting into a table like the example below. This is a PHP program.
I have included my code for the conversions but I need help putting into a table like the example below. This is a PHP program.
Objective: Use PHP classes to code a temperature converter. PHP Class Definition: Temperature - celsius Temp: float fahren Temp: float - kelvin Temp: float + temperature(float temperature, string type): void + incrementTemp(float interval, string type): void + getCelsius(): float + getFahren(): float + getKelvin(): float + is Boiling(): string + isFreezing(): string O o Class specifications: Your constructor should take in an initial temperature and a type (C for Celsius, K for Kelvin, and F for Fahrenheit) 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 an 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 getCelsius, getFahren, and getKelvin should all return number values format to two decimal places isBoiling should check if the current temperature is at or above the boiling point -- 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 . . o . Program specifications: Implement the class within its own PHP file (called Temperature.php) The function names should match those given in the class definition -- it must work with my test file Implement a second PHP file that imports the class and tests it (called testTemperature.php) testTemperature.php should implement one of the example tables found below Additionally, there should be a second table that uses a different incrementer (so, for instance, 25 instead of 10) and start point (so, maybe 100 instead of 0) o testTemperature.php should validate through w3school's validator -- remember, PHP doesn't validate, so you must get the code from the source in the browser and validate that O O Use the following CSS in your php file to style the table:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started