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. 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.
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. 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.
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 5E
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,