Question 1 20 Marks Write the complete java program called Temperature that includes a for loop structure, prompting the user to enter 5 temperature values. The program should add up each temperature...

Question 1 20 Marks Write the complete java program called Temperature that includes a for loop structure, prompting the user to enter 5 temperature values. The program should add up each temperature entered within the loop and this is stored in a variable called total. Using a system statement, output the total temperature value and the average temperature value. Use the sample output below as a guide: The total temperature = The average temperature = Question 2 20 Marks Create the java program called Product that prompts the user to enter names of hardware devices. The program includes a sentinel loop with a value of ### that stops the input from the user. Include a counter variable called inputnum inside the loop, that counts the number of hardware devices the user entered. Using a system statement inside the loop, display the names of hardware devices the user entered. Include a dialog box outside the loop that displays the counter variable value (number of hardware device names entered by the user).Question 3 20 Marks Create a java program called Guess that prompts the user to enter a number. The number entered is passed as a parameter to a void method called CheckNum (int num). Decision statements in the void method CheckNum, checks if the number entered is 100, if that is true, the following message “Number is correct!” is output to screen using a system.out statement, and if the number entered is not 100 then display “Number is incorrect”. The main method () or main program Guess should include the call to the void method CheckNum. Guidelines: Question 1: Data type for temperature values, total and average have to be double. Question 2: Counter variable (inputnum) should be declared as an integer. Question 3: Data type for the number variable entered should be integer. General Guidelines:  Screenshots of the output are optional and will not affect marks awarded. Although it is advisable to include screenshots to check if the code is error-free and produces no logic errors.  Copy code from the IDE (JGrasp) for each question and paste to your Word document.
May 22, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here