Question: Create a package named Q3. Create a driver java class named Task3 which will include the four public static methods: printHeader(), printFooter(), celsiusToFahrenheit() and the
Create a package named Q3. Create a driver java class named Task3 which will include the four public static methods: printHeader(), printFooter(), celsiusToFahrenheit() and the driver, Define the Header and footer methods (copy-paste from Question 1) Define a public static method celsiusToFahrenheit() with appropriate formal parameter list and return type, which will accept a temperature value in Celsius (C) scale as an argument when called and return the value in Fahrenheit (F) scale by using the expression: C/5 = (F-32)/9 Complete the driver method with the following specs in sequence as outlined below: o Print the custom header message with the appropriate question number as argument by calling the header method. o Prompt the user to input a temperature in Celsius, using Scanner reference variable. o Call the celsius ToFahrenheit() and pass the Celsius value as argument list and then print the returned Fahrenheit value with two decimal places from the driver method using printf() statement o Print the custom footer message by calling the footer method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
