Practice ยท 3 of 4
Temperature scale
CHALLENGE
Difficulty: beginner+25 XP
Implement nested class Solution.Temperature: constructor (double celsius) throws ArgumentException below absolute zero (-273.15, exact boundary allowed); read-only Celsius; static factory FromFahrenheit(double f) converting with C = (F โ 32) ร 5โ9 and applying the same validation after conversion.
Press Submit to check your solution.
Back to lesson: Practice: Class workout